From 4c6bd8dd3bf80a7fb53776dd500e72e03aa41bca Mon Sep 17 00:00:00 2001 From: Ernesto Puerta Date: Fri, 11 Dec 2020 21:24:35 +0100 Subject: [PATCH] github: add action to manage needs-rebase label Fixes: https://tracker.ceph.com/issues/48570 Signed-off-by: Ernesto Puerta --- .github/workflows/needs-rebase.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/needs-rebase.yml diff --git a/.github/workflows/needs-rebase.yml b/.github/workflows/needs-rebase.yml new file mode 100644 index 00000000000..d9e2c706fad --- /dev/null +++ b/.github/workflows/needs-rebase.yml @@ -0,0 +1,18 @@ +--- +name: "Pull Request Needs Rebase?" +on: + pull_request_target: + types: [opened, synchronize, reopened] +jobs: + needs-rebase: + runs-on: ubuntu-latest + steps: + # eps1lon/actions-label-merge-conflict@v2.0.1 + # (NOTE: pinning the action to a given commit is a security best-practice: + # https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions) + - name: Check if PR needs rebase + uses: eps1lon/actions-label-merge-conflict@b8bf8341285ec9a4567d4318ba474fee998a6919 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + dirtyLabel: "needs-rebase" + commentOnDirty: "This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved"