Skip to content

Commit bd994b7

Browse files
committed
fix: labeling manually but commenting with automation
1 parent 2258bf7 commit bd994b7

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/label-conflict.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
name: Auto Label Conflicts
2-
on: pull_request_target
2+
on:
3+
pull_request:
4+
branches:
5+
- 'develop'
6+
- '4.*'
37

48
concurrency:
59
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
610
cancel-in-progress: true
711

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

0 commit comments

Comments
 (0)