fix: milestone lookup pagination + first-beta next-major#87
Merged
Conversation
find_milestone (update) and the audit's milestone fetch queried
`milestones?state=all&per_page=100` without --paginate, so they only ever
saw the first 100 milestones. Busy repos like nextcloud/server have well
over 100, so the current milestone sits on a later page and was never
found - the repo was silently skipped ("No milestone found").
Add --paginate to both calls. The test fake-gh now caps a single page at
100 entries (only --paginate walks further), and a new paginated-lookup
scenario places the target milestone past the first page to guard the fix.
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
The first-beta path created "Nextcloud N" (the tag's own major), but that milestone already exists from the previous cycle. The first beta of major N is what opens development of N+1, so it should create "Nextcloud N+1" (e.g. v34.0.0beta1 -> Nextcloud 35). Use $((MAJOR + 1)) for the milestone name and update the README example and the first-beta / first-beta-idempotent test scenarios accordingly. Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
The two boolean inputs were easy to confuse. Spell out that dry_run previews the update (and skips the audit), while audit_only skips the update and only reports inconsistencies. Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
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.
Two bugs in the milestone scripts (merged in #84), surfaced while dry-running a real
v34.0.0update. One commit each.1. Paginate milestone lookups (
fix: paginate milestone lookups across all pages)find_milestone(update) and the audit's milestone fetch queriedmilestones?state=all&per_page=100without--paginate, so they only saw the first 100 milestones.nextcloud/serverhas >100 — the current milestone (Nextcloud 34= #333) sits on a later page and was never found, so the repo was silently skipped (No milestone found ... skipping).Impact: the busiest repo got no milestone management at all.
Fix: add
--paginateto both calls (--paginate+--jqfilters per page and concatenates, so the lookup still works). Testfake-ghnow caps a single page at 100 entries; newpaginated-lookupscenario puts the target past page 1 to guard it.2. First beta creates the next major (
fix: first beta creates the next major milestone (N+1))The first-beta path created
Nextcloud N(the tag's own major), which already exists from the previous cycle. The first beta of major N opens development of N+1, so it must createNextcloud N+1— e.g.v34.0.0beta1→Nextcloud 35.Fix:
Nextcloud $((MAJOR + 1)); README example +first-beta/first-beta-idempotentscenarios updated.Testing
bash tests/milestone-scripts/run.sh— 19 scenarios pass (incl. newpaginated-lookup)bash tests/milestone-scripts/unit.sh— 13 pass--paginatemakespaginated-lookupfail; reverting the N+1 change breaksfirst-beta