Repository navigation
Release script: --review the summary before anything is pushed - #173
Merged
Merged
Conversation
With --review, the script prints the summary before anything is pushed and asks yes, edit or no. The summary is now written before the branch is pushed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_summary returns a status instead of exiting inside $(…), so main stops the script; the edit branch always removes its temp file; and the tests share run_script_with and a pr_opened helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps --review and main's refusals before pushing: the header says both exit 1 with nothing pushed, and the review and refusal tests sit side by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Summary
With
--review,scripts/release.shstops once the summary is written and before anything is pushed. It prints the summary and asks[y]es / [e]dit / [n]o. To make that possible, the summary is now written before the branch is pushed on every run, with or without--review.Without
--review, the script never prompts and never reads stdin. The README's Releasing section now describes--review.Evidence
release.sh --review 0.2.0→usage: release.sh <version>. Theyandetests failed.After:
cargo test --test release: 13 passed, including the new tests:cargo testsuite passes, and so docargo clippy --all-targetsandshellcheck scripts/release.sh.Merge Danger
Door: two-way
Only the maintainer's release script and its tests change. Reverting the PR restores the old behaviour.
Blast Radius: releases
Runs without
--reviewnow push the branch after the summary is written, not before. If the notes fallback fails, the script now stops before pushing anything, where before it had already pushed an orphanrelease-<version>branch.Unaddressed findings
Standards
pr_bodyis shallow now that it only fills a template. Kept: it still owns therelease-summarymarkers the Release page step depends on.run_script_withname doesn't say it adds stdin and env. Kept:_withis the usual Rust idiom, and the doc comment says what it adds.Spec
release_summaryreturns, and the fallback already has its own test.--reviewtest can't prove stdin is never read. Skipped: a black-box test can't observe that directly. The test pipesnand checks the script still reaches the tag without prompting.yes/edit/noare accepted. Kept: the safe default for a prompt that guards a push.$EDITORdefaults toviwhen unset. Kept: the same convention git follows.--reviewis only recognised before the version. Kept: this matches the documented usage,[--review] <version>.Closes #160
🤖 Generated with Claude Code