Skip to content

Commit 77a1b10

Browse files
committed
GH Actions: add workflow to label PRs which are in a conflict state
_For consistency with the other repos in the organisation._ This commit adds a new workflow which automatically checks for merge conflicts in open PRs. The selected action runner also has an option to post a comment when a conflict is detected as well as when the conflict has been resolved. While not currently used, this feature might be useful in the future. Refs: * https://github.com/eps1lon/actions-label-merge-conflict
1 parent 92293f5 commit 77a1b10

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check PRs for merge conflicts
2+
3+
on:
4+
# Check for new conflicts due to merges.
5+
push:
6+
branches:
7+
- stable
8+
- develop
9+
# Check conflicts in new PRs and for resolved conflicts due to an open PR being updated.
10+
pull_request_target:
11+
types:
12+
- opened
13+
- synchronize
14+
- reopened
15+
16+
jobs:
17+
check-prs:
18+
runs-on: ubuntu-latest
19+
if: github.repository_owner == 'PHPCSStandards'
20+
21+
name: Check PRs for merge conflicts
22+
23+
steps:
24+
- name: Check PRs for merge conflicts
25+
uses: eps1lon/actions-label-merge-conflict@v3
26+
with:
27+
dirtyLabel: "Status: has merge conflict"
28+
repoToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)