Prompt for the next milestone ID when resetting CHANGES.md - #820
Closed
wu-sheng wants to merge 1 commit into
Closed
Conversation
When cmd_prepare resets CHANGES.md for the next development version it wrote a literal placeholder: All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/xxx?closed=1) Nothing in the release flow ever filled that in, so the placeholder rode the release PR into main unless someone noticed and edited it by hand, leaving the next version's change log pointing at a dead milestone link. Ask for the milestone ID instead. The prompt is raised up front, next to the version confirmation, rather than after release:prepare, so the release does not stop for input in the middle of a multi-minute build. The answer is validated as numeric and cross-checked against the milestone's title on apache/skywalking, so a typo or a stale ID (for example last release's milestone) is reported before anything is committed. NEXT_MILESTONE=<id> answers non-interactively for scripted runs, and a blank answer keeps the old placeholder behaviour but now warns. gh api writes its error body to stdout on failure, so the title lookup gates on gh's exit status; otherwise a 404 payload would be reported as the milestone name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
Folded into #821 along with the tag-based version fix, so the release-tooling changes land together. The commit is preserved there via cherry-pick. |
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.
Problem
When
cmd_prepareresetsCHANGES.mdfor the next development version, it writes aliteral placeholder that nothing ever fills in:
The release flow has no step that resolves
xxx, so unless the release managerspots it and edits by hand, the placeholder rides the release PR straight into
mainand the next version's change log ships pointing at a dead milestone link.This was hit while preparing 9.7.0 and had to be corrected manually on the release
branch.
Fix
Ask for the milestone ID and substitute it.
release:prepare— so the release doesn't stop for input in the middle of amulti-minute build.
apache/skywalking. Entering last release's ID by mistake is reported beforeanything is committed:
NEXT_MILESTONE=<id>answers non-interactively for scripted runs.than doing it silently.
gh apiwrites its error body to stdout on failure, so the title lookup gates ongh's exit status — otherwise a 404 JSON payload would be reported as the milestone
name.
Testing
bash -npasses. All five input paths exercised against the live GitHub API:263(correct)[INFO] Next milestone: 263 (Java - 9.8.0)249(last release's)[WARN] Milestone 249 is 'Java - 9.7.0', expected 'Java - 9.8.0'999999(nonexistent)[WARN] Could not verify milestone 999999; using it as given26x3(non-numeric)[ERROR] Milestone ID must be a number— aborts[WARN] ... will keep 'milestone/xxx'The generated
CHANGES.mdis byte-identical to the hand-written correction made onthe 9.7.0 release branch (
diffclean).🤖 Generated with Claude Code