move conflict checker to workflows (#2545)

This commit is contained in:
ChunkyProgrammer 2022-09-06 10:47:06 -04:00 committed by GitHub
parent 2a4ca22f66
commit 9236f37d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 34 deletions

View File

@ -1,25 +1,25 @@
name: "Conflicts" name: "Conflicts"
on: on:
# So that PRs touching the same files as the push are updated # So that PRs touching the same files as the push are updated
push: push:
# So that the `dirtyLabel` is removed if conflicts are resolve # So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available. # We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs # In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target: pull_request_target:
types: [synchronize] types: [synchronize]
workflow_run: workflow_run:
workflows: ['Dummy workflow for conflicts'] workflows: ['Dummy workflow for conflicts']
types: [requested] types: [requested]
jobs: jobs:
main: main:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: check if prs are dirty - name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@releases/2.x uses: eps1lon/actions-label-merge-conflict@releases/2.x
with: with:
dirtyLabel: "PR: merge conflicts / rebase needed" dirtyLabel: "PR: merge conflicts / rebase needed"
removeOnDirtyLabel: "PR: waiting for review" removeOnDirtyLabel: "PR: waiting for review"
repoToken: "${{ secrets.GITHUB_TOKEN }}" repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."

View File

@ -1,9 +1,9 @@
name: Dummy workflow for conflicts name: Dummy workflow for conflicts
on: on:
pull_request_review: pull_request_review:
types: [submitted] types: [submitted]
jobs: jobs:
dummy: dummy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "this is a dummy workflow that triggers a workflow_run; it's necessary because otherwise the repo secrets will not be in scope for externally forked pull requests" - run: echo "this is a dummy workflow that triggers a workflow_run; it's necessary because otherwise the repo secrets will not be in scope for externally forked pull requests"