[pull] master from apache:master#571
Merged
pull[bot] merged 1 commit intomiqdigital:masterfrom Mar 30, 2026
Merged
Conversation
…pendencies ## Summary - Rewrite `dev/merge_zeppelin_pr.py` as a single-file Python CLI (`dev/merge_pr.py`) - No external dependencies — uses only Python 3 built-in libraries (`urllib`, `json`, `subprocess`, `argparse`, `re`) - Runs directly with `python3 dev/merge_pr.py --pr <number> [flags]` - Non-interactive, AI-agent friendly design ## Motivation The existing Python merge script (`dev/merge_zeppelin_pr.py`) requires a Python virtual environment with dependencies (`jira`, `python-dotenv`), and is interactive (prompts for user input). This makes it difficult to use from CI/CD or AI agent workflows. The new version: - Requires only Python 3 (no venv, no pip install) - All flags are CLI arguments — no interactive prompts - Single file, ~450 lines, zero external dependencies - Instance-based design (`MergePR` class) ## Usage ```bash # Dry run (shows PR info without merging) python3 dev/merge_pr.py --pr 5167 --dry-run # Merge and resolve JIRA python3 dev/merge_pr.py --pr 5167 --resolve-jira --fix-versions 0.13.0 # Merge and cherry-pick into release branches python3 dev/merge_pr.py --pr 5167 --release-branches branch-0.12,branch-0.11 ``` ## Flags | Flag | Description | |------|-------------| | `--pr` | Pull request number (required) | | `--target` | Target branch (default: PR base branch) | | `--fix-versions` | JIRA fix version(s), comma-separated | | `--release-branches` | Release branch(es) to cherry-pick into, comma-separated | | `--resolve-jira` | Resolve associated JIRA issue(s) | | `--dry-run` | Show what would be done without making changes | | `--push-remote` | Git remote for pushing (default: `apache`) | Tokens are read from environment variables: `GITHUB_OAUTH_KEY`, `JIRA_ACCESS_TOKEN`. ## Test Plan - [x] `python3 dev/merge_pr.py --help` — shows usage - [x] `python3 dev/merge_pr.py --pr 5167 --dry-run` — fetches PR info correctly - [ ] Full merge test with a real PR - [ ] Cherry-pick into release branch test - [ ] JIRA resolution test Closes #5183 from jongyoul/ZEPPELIN-6404-go-merge-cli-v2. Signed-off-by: Jongyoul Lee <jongyoul@gmail.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )