Skip to content

Commit b85aa3e

Browse files
author
Andy Grunwald
authored
Merge pull request #710 from andygrunwald/fix-ci-label-merge-request
CI: Switch Github action to label PRs with merge conflict
2 parents e2d2615 + 1268fc8 commit b85aa3e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
name: Auto-label merge conflicts
22

33
on:
4-
pull_request:
54
workflow_dispatch:
6-
schedule:
7-
- cron: "*/15 * * * *"
8-
9-
# limit permissions
10-
permissions:
11-
contents: read
12-
pull-requests: write
5+
# So that PRs touching the same files as the push are updated
6+
push:
7+
# So that the `dirtyLabel` is removed if conflicts are resolve
8+
# We recommend `pull_request_target` so that github secrets are available.
9+
# In `pull_request` we wouldn't be able to change labels of fork PRs
10+
pull_request_target:
11+
types: [synchronize]
1312

1413
jobs:
15-
conflicts:
14+
main:
1615
runs-on: ubuntu-latest
17-
1816
steps:
19-
- uses: mschilde/auto-label-merge-conflicts@v2.0
17+
- name: check if prs are dirty
18+
uses: eps1lon/actions-label-merge-conflict@v3
2019
with:
21-
CONFLICT_LABEL_NAME: conflicts
22-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
20+
dirtyLabel: "conflicts"
21+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
22+
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
23+
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."

0 commit comments

Comments
 (0)