Skip to content

[pull] master from apache:master#571

Merged
pull[bot] merged 1 commit intomiqdigital:masterfrom
apache:master
Mar 30, 2026
Merged

[pull] master from apache:master#571
pull[bot] merged 1 commit intomiqdigital:masterfrom
apache:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Mar 30, 2026

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 : )

…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>
@pull pull bot locked and limited conversation to collaborators Mar 30, 2026
@pull pull bot added the ⤵️ pull label Mar 30, 2026
@pull pull bot merged commit 221c0c5 into miqdigital:master Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant