Skip to content

Commit df03d10

Browse files
authored
Merge pull request #7936 from ddevsr/event-trigger
chore: fix: event trigger label conflict
2 parents e420c03 + 521c50a commit df03d10

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.github/workflows/label-conflict.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1-
name: Auto Label Conflicts
1+
name: Auto Comment Conflicts
22
on:
33
pull_request:
44
branches:
55
- 'develop'
66
- '4.*'
7+
types:
8+
- labeled
79

810
concurrency:
911
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1012
cancel-in-progress: true
1113

12-
permissions:
13-
contents: read
14-
issues: write
15-
pull-requests: write
16-
1714
jobs:
18-
auto-label:
15+
auto-comment-conflict:
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
if: github.event.label.name == 'stale'
1920
runs-on: ubuntu-latest
2021
steps:
21-
- uses: prince-chrismc/label-merge-conflicts-action@v3
22+
- name: Add comment for PR with conflict
23+
uses: peter-evans/create-or-update-comment@v3
2224
with:
23-
conflict_label_name: 'stale'
24-
github_token: ${{ github.token }}
25-
26-
# --- Optional Inputs ---
27-
# To make sure the merge commit exactly matches the branch
28-
detect_merge_changes: true # or true to handle as conflicts
29-
# By default a comment will be left, adding `conflict_comment: ''` will disable comments
30-
# The optional `${author}` will be replaced with the username of the pull request
31-
conflict_comment: |
32-
:wave: Hi, @${author},
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
issue-number: ${{ github.event.pull_request.number }}
27+
body: |
28+
:wave: Hi, @${{ github.event.pull_request.user.login }}!
3329
3430
We detected conflicts in your PR against the base branch :speak_no_evil:
3531
You may want to sync :arrows_counterclockwise: your branch with upstream!

0 commit comments

Comments
 (0)