Add cherry_pick.py script for ORT release (#27333)
This PR introduces a new Python script, `cherry_pick.py`, to automate
the cherry-picking process for release branches.
## Features
- **Automated List Generation**: Fetches merged PRs with a specific
label (e.g., `release:1.24.2`) using the `gh` CLI.
- **Sorted Output**: Sorts PRs by merge date to ensure chronological
application.
- **Batch File Creation**: Generates a `.cmd` file with `git
cherry-pick` commands.
- **Markdown Notes**: Generates a markdown file
(`cherry_pick_pr_description.md`) suitable for the release PR
description.
- **Dependency Checking**: Checks for potential missing dependencies
(conflicts) by verifying if files modified by the cherry-picked commits
have prior modifications in the target branch that are not included in
the cherry-pick list.
- Warns about missing commits and lists affected files.
## Usage
```bash
python cherry_pick.py --label "release:1.24.2" --output cherry_pick.cmd --branch "origin/rel-1.24.2"
```
## 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
```
Fetching merged PRs with label 'release:1.24.2' from microsoft/onnxruntime...
Generated cherry_pick.cmd with 15 commits.
Generated cherry_pick_pr_description.md with 15 commits.
Checking for potential missing dependencies (conflicts)...
WARNING: In PR #27256 (5645b77...), file 'onnxruntime/core/platform/windows/telemetry.cc' was modified by commit 9486eedc4... (Record service in telemetry events (#27252)) which is not included in the cherry-pick list.
```