Skip to content

Commit

Permalink
Merge pull request #7936 from ddevsr/event-trigger
Browse files Browse the repository at this point in the history
chore: fix: event trigger label conflict
  • Loading branch information
kenjis authored Sep 15, 2023
2 parents e420c03 + 521c50a commit df03d10
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/label-conflict.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
name: Auto Label Conflicts
name: Auto Comment Conflicts
on:
pull_request:
branches:
- 'develop'
- '4.*'
types:
- labeled

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

permissions:
contents: read
issues: write
pull-requests: write

jobs:
auto-label:
auto-comment-conflict:
permissions:
contents: read
pull-requests: write
if: github.event.label.name == 'stale'
runs-on: ubuntu-latest
steps:
- uses: prince-chrismc/label-merge-conflicts-action@v3
- name: Add comment for PR with conflict
uses: peter-evans/create-or-update-comment@v3
with:
conflict_label_name: 'stale'
github_token: ${{ github.token }}

# --- Optional Inputs ---
# To make sure the merge commit exactly matches the branch
detect_merge_changes: true # or true to handle as conflicts
# By default a comment will be left, adding `conflict_comment: ''` will disable comments
# The optional `${author}` will be replaced with the username of the pull request
conflict_comment: |
:wave: Hi, @${author},
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
:wave: Hi, @${{ github.event.pull_request.user.login }}!
We detected conflicts in your PR against the base branch :speak_no_evil:
You may want to sync :arrows_counterclockwise: your branch with upstream!
Expand Down

0 comments on commit df03d10

Please sign in to comment.