From ee99cfe25010013545b1d2af7d02dc8b0feba42a Mon Sep 17 00:00:00 2001 From: Krishanu Konar Date: Sun, 13 Oct 2024 00:12:07 +0100 Subject: [PATCH 1/2] Added restyle workflow --- .github/workflows/restyled.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/restyled.yml diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml new file mode 100644 index 000000000..8d7daa3f1 --- /dev/null +++ b/.github/workflows/restyled.yml @@ -0,0 +1,36 @@ +name: Restyled + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + restyled: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - uses: restyled-io/actions/setup@v4 + - id: restyler + uses: restyled-io/actions/run@v4 + with: + fail-on-differences: true + + - if: | + !cancelled() && + steps.restyler.outputs.success == 'true' && + github.event.pull_request.head.repo.full_name == github.repository + uses: peter-evans/create-pull-request@v6 + with: + base: ${{ steps.restyler.outputs.restyled-base }} + branch: ${{ steps.restyler.outputs.restyled-head }} + title: ${{ steps.restyler.outputs.restyled-title }} + body: ${{ steps.restyler.outputs.restyled-body }} + labels: "restyled" + reviewers: ${{ github.event.pull_request.user.login }} + delete-branch: true \ No newline at end of file From c2a03b2b7282dbe85d4b3b066f816dfcf7731e29 Mon Sep 17 00:00:00 2001 From: Krishanu Konar Date: Sun, 13 Oct 2024 00:43:15 +0100 Subject: [PATCH 2/2] fixed linting issues with restyled.yml --- .github/workflows/restyled.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml index 8d7daa3f1..9680cf411 100644 --- a/.github/workflows/restyled.yml +++ b/.github/workflows/restyled.yml @@ -24,7 +24,7 @@ jobs: - if: | !cancelled() && steps.restyler.outputs.success == 'true' && - github.event.pull_request.head.repo.full_name == github.repository + github.event.pull_request.head.repo.full_name == github.repository uses: peter-evans/create-pull-request@v6 with: base: ${{ steps.restyler.outputs.restyled-base }} @@ -33,4 +33,4 @@ jobs: body: ${{ steps.restyler.outputs.restyled-body }} labels: "restyled" reviewers: ${{ github.event.pull_request.user.login }} - delete-branch: true \ No newline at end of file + delete-branch: true