From fa3d78b0923fdd129977221e4a633dd22607870a Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Sun, 19 May 2024 02:29:43 -0400 Subject: [PATCH] ci: prevent merge of stacked PRs --- .github/workflows/stacked-prs.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/stacked-prs.yaml diff --git a/.github/workflows/stacked-prs.yaml b/.github/workflows/stacked-prs.yaml new file mode 100644 index 0000000..bf2390a --- /dev/null +++ b/.github/workflows/stacked-prs.yaml @@ -0,0 +1,14 @@ +name: Stacked PRs +on: + pull_request: + pull_request_target: + +jobs: + prevent_merge_of_stacked_pr: + runs-on: ubuntu-latest + steps: + - name: Check that base is "main" + run: | + if [[ "${GITHUB_BASE_REF}" != "main" ]]; then + exit 1; + fi