Skip to content

Commit eb8856b

Browse files
authored
Merge pull request #828 from armsnyder/workflow-pr-check-conflicts
Workflows: Automate applying merge-conflict label
2 parents 43c0b0b + 0274c76 commit eb8856b

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+
# GitHub Action reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2+
3+
name: pr-check-conflicts
4+
5+
on:
6+
# For adding the merge-conflict label.
7+
push:
8+
branches:
9+
- main
10+
- master
11+
# For removing the merge-conflict label.
12+
pull_request_target:
13+
types: [synchronize]
14+
15+
permissions:
16+
pull-requests: write
17+
18+
jobs:
19+
label:
20+
runs-on: ubuntu-latest
21+
steps:
22+
# Docs: https://github.com/marketplace/actions/label-conflicting-pull-requests
23+
- uses: eps1lon/[email protected]
24+
with:
25+
dirtyLabel: merge-conflict
26+
repoToken: ${{ secrets.GITHUB_TOKEN }}
27+
commentOnDirty: 'This pull request has merge conflicts. Please rebase your branch onto `${{ github.event.repository.default_branch }}`.'
28+
commentOnClean: 'Conflicts are resolved. Thank you! :grinning:'

0 commit comments

Comments
 (0)