Skip to content

Commit 543380c

Browse files
authored
[CI] Add merge conflict label job (#1050)
Add bot to label merge conflicts, it helps developer and maintainer to do code review and update clear. Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
1 parent f24375f commit 543380c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Merge Conflict Labeler"
2+
on:
3+
# So that PRs touching the same files as the push are updated
4+
push:
5+
# So that the `dirtyLabel` is removed if conflicts are resolve
6+
# We recommend `pull_request_target` so that github secrets are available.
7+
# In `pull_request` we wouldn't be able to change labels of fork PRs
8+
pull_request_target:
9+
types: [synchronize]
10+
11+
jobs:
12+
main:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: check if prs are dirty
16+
uses: eps1lon/actions-label-merge-conflict@v3
17+
with:
18+
dirtyLabel: "merge-conflicts"
19+
removeOnDirtyLabel: "ready"
20+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
21+
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."

0 commit comments

Comments
 (0)