diff --git a/.github/label-conflict.yml b/.github/label-conflict.yml new file mode 100644 index 000000000000..0030dd06bede --- /dev/null +++ b/.github/label-conflict.yml @@ -0,0 +1,37 @@ +name: Auto Label Conflicts +on: + pull_request: + branches: + - 'develop' + - '4.*' + +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: + runs-on: ubuntu-latest + steps: + - uses: prince-chrismc/label-merge-conflicts-action@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}, + + We detected conflicts in your PR against the base branch :speak_no_evil: + You may want to sync :arrows_counterclockwise: your branch with upstream! + + Ref: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#pushing-your-branch