Add cherry_pick.py script for ORT release#27333
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new helper script under tools/python/ to streamline generating release-branch cherry-pick command batches and accompanying PR-description notes, using GitHub CLI metadata and optional git-history checks to flag potential missing related commits.
Changes:
- Introduces
tools/python/cherry_pick.pyto query merged PRs by label viagh pr list, sort by merge time, and emit a.cmdfile ofgit cherry-pickcommands. - Generates
cherry_pick_pr_description.mdcontaining the set of PR numbers included in the cherry-pick batch. - Adds a “missing dependencies” heuristic that inspects git history for other commits touching the same files that aren’t in the cherry-pick set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This PR introduces a new Python script,
cherry_pick.py, to automate the cherry-picking process for release branches.Features
release:1.24.2) using theghCLI..cmdfile withgit cherry-pickcommands.cherry_pick_pr_description.md) suitable for the release PR description.Usage
Arguments
--label: Label to filter PRs (required).--output: Output path for the batch file (required).--repo: Target repository (default:microsoft/onnxruntime).--branch: Target branch to compare against for dependency checks (default:HEAD).Example Output