feat: improve merge-check action to leave a comment and label to PRs

This commit is contained in:
pasta 2024-08-09 19:39:46 +07:00
parent 117dda9d6f
commit 5394d63e18
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -1,8 +1,12 @@
name: Check Merge Fast-Forward Only
permissions:
pull-requests: write
on:
push:
pull_request:
- push
- pull_request_target
- pull_request_review
jobs:
check_merge:
@ -27,3 +31,17 @@ jobs:
else
git merge --ff-only ${{ github.sha }}
fi
- name: add labels
uses: actions-ecosystem/action-add-labels@v1
if: failure()
with:
labels: |
needs rebase
- name: comment
uses: mshick/add-pr-comment@v2
if: failure()
with:
message: |
This pull request has conflicts, please rebase.