fix: Refine milestone assignment#1269
Merged
Merged
Conversation
Update milestone assignment script to broaden issue closure detection - Relax logic to assign the "next release" milestone not only when issues are closed by a merged PR to main, but also when issues are closed by any commit, including manual closures referencing commits. - This allows handling cases where issues are manually closed but related to commits without explicit PR keywords. - Adjust log messages to reflect the broader closing condition. - Improve robustness in identifying relevant closed issues for milestone assignment.
Enhance milestone assignment to detect issues closed by merged PRs to main - Fetch closed issues and check their timeline events for closure by a pull request. - Verify the pull request was merged and targeted the main branch. - Assign the "Next Release" milestone only to issues closed by such merged PRs. - Skip issues already assigned the milestone or not closed by merged PRs. - Support dry run mode for safe testing without modifying issues.
…ed PRs - Fetch closed issues filtered by reason:completed. - Confirm closure by PR merged to main via timeline events. - Assign “Next Release” milestone if not already assigned. - Support dry run mode and improve logging.
- Log all timeline events for each issue to help debug closure sources. - Track and display a list of issue numbers that are (or would be) assigned the "Next Release" milestone. - Limit processed issues to those closed within the last 45 days. - Preserve dry run behavior with clearer summary output.
davidgamez
approved these changes
Jan 27, 2026
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.
This update improves the original milestone assignment script by:
reason: completedand issues closed in the last 45 days, rather than all closed issues.closedevent in the issue timeline, allowing manual closures without linked PR merges.These changes address edge cases missed by the original logic that relied strictly on PR-merged closure events, making milestone assignment more reliable for internal workflows.