From b5c0bea6a5b6667d3e2512fc6d5484569ab457ce Mon Sep 17 00:00:00 2001 From: Stafford Brooke Date: Tue, 11 Aug 2026 15:09:10 -0400 Subject: [PATCH] fix(ci): close the release issue once the release is cut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release-please files "Release X is ready to open" when the org blocks it from creating the PR, and nothing closed it afterwards — one dead issue per release, each pointing at work already done. Three had accumulated across both repos. The release existing is the definitive done signal, so it closes there. --- .github/workflows/release-please.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index e68321b..a9b4e1f 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -148,6 +148,27 @@ jobs: # publishing never fires on its own. workflow_dispatch is an explicit # exception to that rule, so GITHUB_TOKEN can start it directly. Same repo # only, and it needs `actions: write` above. + # release-please files "Release X is ready to open" when it cannot create + # the PR, and nothing closed it once the release shipped — one dead issue + # per release, each telling you to do work already done. The release + # existing is the definitive done signal. + - name: Close the release issue + if: steps.github_release.outputs.released != '' + run: | + set -euo pipefail + version="${{ steps.github_release.outputs.released }}" + version="${version#v}" + num=$(gh issue list --repo '${{ github.repository }}' --state open \ + --search "Release $version is ready to open in:title" \ + --json number --jq '.[0].number // empty') + if [ -n "$num" ]; then + gh issue close "$num" --repo '${{ github.repository }}' \ + --comment "Shipped — release $version is cut and publishing dispatched." + echo "closed #$num" + else + echo "no open release issue for $version" + fi + - name: Publish the release if: steps.github_release.outputs.released != '' run: |