From b76c26cb4691b12377ec245112af4a96fef9a73d Mon Sep 17 00:00:00 2001 From: Ben Challis Date: Sat, 2 Mar 2024 23:39:40 +0000 Subject: [PATCH] Fix merge gatekeeper on PRs (#290) `github.ref` breaks PRs, but works for merge queues, make it conditional. See https://github.com/upsidr/merge-gatekeeper/issues/71 --------- Co-authored-by: Marcin Michalski --- .github/workflows/merge-gatekeeper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml index 737629d8..4dd61413 100644 --- a/.github/workflows/merge-gatekeeper.yml +++ b/.github/workflows/merge-gatekeeper.yml @@ -17,4 +17,4 @@ jobs: uses: upsidr/merge-gatekeeper@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }}