From 90033fe693a9ca4c299c95671fa57496bab2909c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JC=20Gr=C3=BCnhage?= Date: Fri, 18 Apr 2025 19:49:34 +0200 Subject: [PATCH] fix(ci): set token for fast-forward failure comments and allow merging with state unstable (#11647) ## Problem https://github.com/neondatabase/neon/actions/runs/14538136318/job/40790985693?pr=11645 failed, even though the relevant parts of the CI had passed and auto-merge determined the PR is ready to merge. After that, commenting failed. ## Summary of changes - set GH_TOKEN for commenting after fast-forward failure - allow merging with mergeable_state unstable --- .github/workflows/fast-forward.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml index a292522b88..f80596a7a6 100644 --- a/.github/workflows/fast-forward.yml +++ b/.github/workflows/fast-forward.yml @@ -27,15 +27,17 @@ jobs: - name: Fast forwarding uses: sequoia-pgp/fast-forward@ea7628bedcb0b0b96e94383ada458d812fca4979 # See https://docs.github.com/en/graphql/reference/enums#mergestatestatus - if: ${{ github.event.pull_request.mergeable_state == 'clean' }} + if: ${{ contains(fromJSON('["clean", "unstable"]'), github.event.pull_request.mergeable_state) }} with: merge: true comment: on-error github_token: ${{ secrets.CI_ACCESS_TOKEN }} - name: Comment if mergeable_state is not clean - if: ${{ github.event.pull_request.mergeable_state != 'clean' }} + if: ${{ !contains(fromJSON('["clean", "unstable"]'), github.event.pull_request.mergeable_state) }} + env: + GH_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} run: | gh pr comment ${{ github.event.pull_request.number }} \ --repo "${GITHUB_REPOSITORY}" \ - --body "Not trying to forward pull-request, because \`mergeable_state\` is \`${{ github.event.pull_request.mergeable_state }}\`, not \`clean\`." + --body "Not trying to forward pull-request, because \`mergeable_state\` is \`${{ github.event.pull_request.mergeable_state }}\`, not \`clean\` or \`unstable\`."