From 1ce9a90de5489d824946ca2f20a6f54e05be4766 Mon Sep 17 00:00:00 2001 From: Uruk Date: Tue, 10 Oct 2023 01:54:18 +0200 Subject: [PATCH 1/4] Added automation workflow to prevent merge conflicts ``` --- .github/workflows/automation.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/automation.yml diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml new file mode 100644 index 0000000..556bc34 --- /dev/null +++ b/.github/workflows/automation.yml @@ -0,0 +1,20 @@ +name: 'Automation' + +on: + push: + branches: [ master ] + pull_request_target: + types: [ synchronize ] + +jobs: + triage: + name: 'Merge conflict labeling' + runs-on: ubuntu-latest + if: ${{ github.repository == 'tycrek/ass' }} + steps: + - uses: eps1lon/actions-label-merge-conflict@releases/2.x + with: + dirtyLabel: 'merge conflict' + commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.' + commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." + repoToken: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From a6d2479c76e93d1e9ea7bf88f7edd8fb3c8d703d Mon Sep 17 00:00:00 2001 From: Gauvino <68083474+Gauvino@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:35:29 +0200 Subject: [PATCH 2/4] Change name and add wf to issue --- .github/workflows/automation.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml index 556bc34..2f5828d 100644 --- a/.github/workflows/automation.yml +++ b/.github/workflows/automation.yml @@ -1,20 +1,22 @@ -name: 'Automation' +name: Merge Conflict Labeler on: push: branches: [ master ] pull_request_target: types: [ synchronize ] + issue_comment: jobs: - triage: + label: name: 'Merge conflict labeling' runs-on: ubuntu-latest if: ${{ github.repository == 'tycrek/ass' }} steps: - uses: eps1lon/actions-label-merge-conflict@releases/2.x + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}} with: dirtyLabel: 'merge conflict' commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.' commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." - repoToken: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + repoToken: "${{ secrets.GITHUB_TOKEN }}" From ff47f7c02afe6795bd4a540ef9bedec8ca83c57a Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Fri, 13 Oct 2023 21:54:15 -0600 Subject: [PATCH 3/4] fix: secrets cannot start with `GITHUB_` --- .github/workflows/automation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml index 2f5828d..cc0c7f3 100644 --- a/.github/workflows/automation.yml +++ b/.github/workflows/automation.yml @@ -19,4 +19,4 @@ jobs: dirtyLabel: 'merge conflict' commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.' commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." - repoToken: "${{ secrets.GITHUB_TOKEN }}" + repoToken: "${{ secrets.GH_TOKEN }}" From fc9bcb9cba83b0a2424b6c42fa46d02a8049381b Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Fri, 13 Oct 2023 21:56:32 -0600 Subject: [PATCH 4/4] fix: run on all branches --- .github/workflows/automation.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml index cc0c7f3..c2d27d8 100644 --- a/.github/workflows/automation.yml +++ b/.github/workflows/automation.yml @@ -2,10 +2,8 @@ name: Merge Conflict Labeler on: push: - branches: [ master ] pull_request_target: types: [ synchronize ] - issue_comment: jobs: label: