diff --git a/.github/workflows/merge-check.yml b/.github/workflows/merge-check.yml index 52a0aed076..caaa98863e 100644 --- a/.github/workflows/merge-check.yml +++ b/.github/workflows/merge-check.yml @@ -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.