From 460522080c0d5d45e81c8726d75f6de70a36588e Mon Sep 17 00:00:00 2001 From: Robert Date: Sun, 19 May 2024 18:32:08 -0700 Subject: [PATCH] Setup https://github.com/cyberark/enforce-rebase --- .github/workflows/enforce-rebase.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/enforce-rebase.yml diff --git a/.github/workflows/enforce-rebase.yml b/.github/workflows/enforce-rebase.yml new file mode 100644 index 000000000..0da33de96 --- /dev/null +++ b/.github/workflows/enforce-rebase.yml @@ -0,0 +1,24 @@ +# This workflow will fail if the branch contains a merge commit or if +# it isn't based on master. +# +# Caveat: It runs at push time, so if master moves after the branch is +# push, this will still pass. A merge queue is likely needed to solve +# this. +# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue +# Another workaround is that mergers could re-run just this workflow. +name: Enforce Rebasing + +on: [push] + +jobs: + rebase_job: + runs-on: ubuntu-latest + name: Enforce rebasing + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Is Rebased on master? + uses: rspier/enforce-rebase@master