Skip to content

Commit ec4c545

Browse files
jongyoulclaude
andcommitted
[ZEPPELIN-6404] Auto-download Go in /merge-pr skill if not installed
The skill now checks for Go availability and downloads it to .go/ directory if not found, so the merge tool works without pre-installed Go. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7a6e7aa commit ec4c545

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

.claude/commands/merge-pr.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@ Parse the user's intent and build the appropriate `go run dev/merge-pr.go` comma
1414

1515
## Instructions
1616

17-
1. Extract from the user input: PR number, fix-versions, release-branches, resolve-jira, and any other flags.
18-
2. If the PR number is missing, ask for it.
19-
3. Always add `--resolve-jira` unless the user explicitly says not to.
20-
4. Run a dry-run first:
17+
1. Check if `go` is available by running `go version`. If not found:
18+
- Detect OS and arch (`uname -s`, `uname -m`)
19+
- 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`
20+
- Use `.go/bin/go` instead of `go` for all subsequent commands.
21+
- `.go/` is already in `.gitignore`.
22+
2. Extract from the user input: PR number, fix-versions, release-branches, resolve-jira, and any other flags.
23+
3. If the PR number is missing, ask for it.
24+
4. Always add `--resolve-jira` unless the user explicitly says not to.
25+
5. Run a dry-run first:
2126

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

26-
5. Show the dry-run output to the user and ask for confirmation before proceeding.
27-
6. If the user confirms, run the actual merge command (without `--dry-run`), using the effective command from the dry-run output.
28-
7. After merge, verify the result and report back.
31+
6. Show the dry-run output to the user and ask for confirmation before proceeding.
32+
7. If the user confirms, run the actual merge command (without `--dry-run`), using the effective command from the dry-run output.
33+
8. After merge, verify the result and report back.
2934

3035
## Flags Reference
3136

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ tramp
149149

150150
# dotenv files
151151
.env
152+
153+
# local Go installation
154+
.go/

0 commit comments

Comments
 (0)