Repository navigation
Conversation
The first /release run for 2.1.2 stopped in its first step. For a missing tag, gh api prints GitHub's Not Found body on standard output, and the step read that body as the commit the tag names. Both tag checks now read the matching-refs list, which is empty when there is no tag, and stop on any other failure instead of treating it as no tag. The report job ran only after the first step set release to true, so the refused run left no comment on the pull request. It now also runs when that step fails. No version change: main is still 2.1.2 with no tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the release workflow so
/releasecan release 2.1.2. No version change:mainstays at 2.1.2, which has no tag yet.What went wrong
The
/releaserun after #45 failed in "Decide what to release" (run):For a tag that does not exist,
gh api repos/.../git/ref/tags/<tag>exits with status 1 but prints GitHub's "Not Found" body on standard output. The step ignored the exit status (|| true) and read that body as the tag's commit. The "Tag the tested commit" step had the same check, so it would have failed in the same way.No pull request comment followed, because the report job ran only when the first step had set
releaseto true.The fix
git/matching-refs/tags/<tag>. It returns an empty list when there is no tag. An annotated tag is followed to its commit. Any other failure, such as an outage, now stops the step instead of being read as "no tag".package.jsonversion that is notX.Y.Z, because the version becomes part of the tag.Verified
Both edited steps were taken from this workflow file and run with
bash -e, as Actions runs them, against this repository. A guard stopped any tag from being created.main, publish on, nov2.1.2tagrelease=true, "Releasing v2.1.2 from 073f9bc…"release=false, exit 0v2.1.2missingv2.0.0already on that commitv2.0.0on another commitThe old decide step, run the same way, reproduces the error above.
Not tested here: an annotated tag (the repository has none), and the report job's new condition, which runs only on GitHub. The next
/releaseis the full test.cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(731 tests), and the npmci,typecheck, andteststeps pass.After merging
/releaseon this pull request when the bot says 2.1.2 is ready.🤖 Generated with Claude Code