Skip to content

Commit

Permalink
Add workflow job to label PRs with conflicts (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Dec 16, 2023
1 parent 905116d commit 803114c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/label-conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Label merge conflicts"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# 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
pull_request_target:
# GitHub documents "synchronize" as:
# A pull request's head branch was updated. For example, the head branch
# was updated from the base branch or new commits were pushed to the
# head branch.
types: [synchronize]

jobs:
conflicts:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: check if PRs are mergeable
uses: eps1lon/actions-label-merge-conflict@v2.1.0
with:
dirtyLabel: "conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those so that the changes can be evaluated."
commentOnClean: "All conflicts have been resolved, thanks!"

0 comments on commit 803114c

Please sign in to comment.