Skip to content

Expand project scripts to work with issues too#187

Merged
james-bruten-mo merged 12 commits intoMetOffice:mainfrom
jennyhickson:tidy_issues
Feb 17, 2026
Merged

Expand project scripts to work with issues too#187
james-bruten-mo merged 12 commits intoMetOffice:mainfrom
jennyhickson:tidy_issues

Conversation

@jennyhickson
Copy link
Collaborator

@jennyhickson jennyhickson commented Feb 16, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer: @james-bruten-mo

Expand the current Project scripts to work with both the Issue and Pull requests, and expand the milestone script to also finish issues:

  • Change ProjectData class to work with issues and pull requests
  • Change PullRequest class into a ProjectItem base class, with PullRequest and Issue child classes
  • Add checks for outstanding In Review issues before closing milestone
  • Refactor checks using new count_items routine
  • Remove all remaining open issues from the milestone
  • Rename test data from the review tracker to pr.json and add test data from the issue tracker

Also(!) add a new script for any project maintenance that happens at the CR deadline. Currently this just removes issues that don't have a linked PR from the milestone.

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

@james-bruten-mo james-bruten-mo self-requested a review February 17, 2026 08:43
Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing major

print_banner(f"Checking for closed pull requests not set to {milestone}")
total_other = 0
for milestone in reviews.milestones:
if milestone == milestone:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work? Surely you'll need a different variable name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weirdly it does seem to, but I've changed it for clarity


def remove_milestone(
issue_data: ProjectData, milestone: str, dry_run: bool = False
) -> int:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

jennyhickson and others added 3 commits February 17, 2026 11:47
Co-authored-by: James Bruten <109733895+james-bruten-mo@users.noreply.github.com>
Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, cheers

@james-bruten-mo james-bruten-mo merged commit f8f8ad1 into MetOffice:main Feb 17, 2026
8 checks passed
@jennyhickson jennyhickson added this to the Spring 2026 milestone Feb 18, 2026
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.

2 participants

Comments