Skip to content

Conversation

fredericsimard
Copy link
Contributor

@fredericsimard fredericsimard commented Jun 18, 2025

This update improves the original milestone assignment script by:

  • Changing issue retrieval to use GitHub Search API filtered by reason: completed and issues closed in the last 45 days, rather than all closed issues.
  • Modifying closure detection to consider any closed event in the issue timeline, allowing manual closures without linked PR merges.
  • Adding detailed logging of all timeline events per issue to aid debugging closure detection.
  • Skipping issues that already have the "Next Release" milestone assigned.
  • Tracking and printing a summary list of issues assigned the milestone during each run.
  • Supporting dry run mode to simulate changes safely.
  • Maintaining backwards compatibility while improving accuracy and transparency.

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.

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.
@fredericsimard fredericsimard self-assigned this Jun 18, 2025
@fredericsimard fredericsimard removed the request for review from davidgamez June 18, 2025 23:04
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.
@fredericsimard fredericsimard changed the title fix: changed logic... fix: Refine milestone assignment Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant