Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
37cc85c
[ZEPPELIN-6404] Rewrite merge PR CLI as single-file Go using standard…
jongyoul Mar 16, 2026
a152f9f
[ZEPPELIN-6404] Simplify merge-pr.go: precompile regexps, fix quality…
jongyoul Mar 16, 2026
25f1379
[ZEPPELIN-6404] Rename flags to plural: --fix-versions, --release-bra…
jongyoul Mar 16, 2026
67bd490
[ZEPPELIN-6404] Match Python script behavior: component brackets and …
jongyoul Mar 17, 2026
5486110
[ZEPPELIN-6404] Combine explicit fix-versions with auto-inferred rele…
jongyoul Mar 17, 2026
0d6ba9c
[ZEPPELIN-6404] Add effective command output in dry-run, fix JIRA Acc…
jongyoul Mar 17, 2026
7a6e7aa
[ZEPPELIN-6404] Add /merge-pr Claude Code skill
jongyoul Mar 17, 2026
ec4c545
[ZEPPELIN-6404] Auto-download Go in /merge-pr skill if not installed
jongyoul Mar 17, 2026
7e3276a
[ZEPPELIN-6404] Improve /merge-pr skill: interactive confirmation loop
jongyoul Mar 17, 2026
b85ec89
[ZEPPELIN-6404] Show --help and ask for input when PR number is missing
jongyoul Mar 17, 2026
55a6b3d
[ZEPPELIN-6404] Comment on PR with merge summary after merge
jongyoul Mar 17, 2026
912c9e3
[ZEPPELIN-6404] Add Apache license header to merge-pr.md
jongyoul Mar 17, 2026
1aa88e5
[ZEPPELIN-6404] Add Java CLI tool for merging pull requests
jongyoul Mar 17, 2026
4d62d3a
[ZEPPELIN-6404] Remove Go CLI and update skill to use Java
jongyoul Mar 17, 2026
49b6c3c
[ZEPPELIN-6404] Refactor Java CLI to instance-based style
jongyoul Mar 17, 2026
4ee0887
[ZEPPELIN-6404] Fix help text alignment in merge-pr.java
jongyoul Mar 17, 2026
e2c5da9
[ZEPPELIN-6404] Rewrite merge CLI in Python, remove Java and skill
jongyoul Mar 17, 2026
85f63fe
[ZEPPELIN-6404] Simplify merge_pr.py: deduplicate JIRA calls, extract…
jongyoul Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .claude/commands/merge-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Merge a pull request using the Go CLI tool (`dev/merge-pr.go`).

## Input

User input: $ARGUMENTS

This can be in any form — CLI flags, natural language, or a mix. Examples:
- `5167`
- `5167 fix-versions 0.13.0, also cherry-pick into branch-0.12`
- `5167 --fix-versions 0.13.0 --release-branches branch-0.12`
- `merge PR #5167 and resolve JIRA`

Parse the user's intent and build the appropriate `go run dev/merge-pr.go` command.

## Instructions

1. Check if `go` is available by running `go version`. If not found:
- Detect OS and arch (`uname -s`, `uname -m`)
- Download Go to `.go/` directory: `curl -fsSL https://go.dev/dl/go1.23.6.<os>-<arch>.tar.gz | tar -xz -C .go --strip-components=1`
- Use `.go/bin/go` instead of `go` for all subsequent commands.
- `.go/` is already in `.gitignore`.
2. Extract from the user input: PR number, fix-versions, release-branches, resolve-jira, and any other flags.
3. If the PR number is missing or no arguments given, run `go run dev/merge-pr.go --help` to show available flags, then ask the user for the PR number and any options they want.
4. Always add `--resolve-jira` unless the user explicitly says not to.
5. Run a dry-run first:

```
go run dev/merge-pr.go --pr <number> --resolve-jira [--fix-versions <versions>] [--release-branches <branches>] --dry-run
```

6. Show the dry-run output (including the effective command) to the user and ask:
- Does the effective command look correct?
- Do you want to change fix-versions, add release-branches, or adjust anything?
- If the user wants changes, re-run dry-run with updated flags and ask again.
- If the user confirms, proceed to step 7.
7. Run the actual merge command (without `--dry-run`), using the effective command from the dry-run output.
8. After merge, verify the result and report back.

## Flags Reference

| Flag | Description |
|------|-------------|
| `--pr` | PR number (required) |
| `--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) |
| `--target` | Target branch (default: PR base branch) |

## Notes

- Always dry-run first. Never merge without user confirmation.
- If `--fix-versions` is omitted and `--release-branches` is given, versions are auto-inferred from JIRA.
- Tokens are read from environment: `GITHUB_OAUTH_KEY`, `JIRA_ACCESS_TOKEN`.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ tramp

# dotenv files
.env

# local Go installation
.go/
Loading
Loading