Skip to content

Commit 8301c93

Browse files
committed
fix: use dynamic base branch detection in /test and add gh permission to /review
- test.md: Add Bash(gh:*) to allowed-tools and update Step 0 to detect base branch from gh pr view --json baseRefName with fallback to main - review.md: Add Bash(gh:*) to allowed-tools to enable base branch detection that was already documented but not permitted
1 parent 17083bb commit 8301c93

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.claude/commands/review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Review before merge. Five-axis code review across architecture, security, quality, tests, and standards. Run after /test.
3-
allowed-tools: Task, Skill, Read, Glob, Grep, Bash(git diff:*), Bash(git log:*), Bash(git status:*)
3+
allowed-tools: Task, Skill, Read, Glob, Grep, Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(gh:*)
44
argument-hint: [branch-or-pr-number]
55
---
66

.claude/commands/test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Prove it works. Multi-dimensional quality validation across functional, non-functional, security, DevOps, DX, and observability. Run after /build.
3-
allowed-tools: Task, Skill, Read, Glob, Grep, Bash(git diff:*), Bash(git status:*), Bash(git log:*), Bash(python3:*), Bash(pytest:*), Bash(npm test:*), Bash(uv:*), Bash(pester:*)
3+
allowed-tools: Task, Skill, Read, Glob, Grep, Bash(git diff:*), Bash(git status:*), Bash(git log:*), Bash(gh:*), Bash(python3:*), Bash(pytest:*), Bash(npm test:*), Bash(uv:*), Bash(pester:*)
44
argument-hint: [component-or-failure-description]
55
---
66

@@ -12,7 +12,7 @@ If $ARGUMENTS is empty, test the current branch diff against the base branch.
1212

1313
## Step 0: Classify PR Type
1414

15-
Run `git diff origin/main --name-only` and classify changed files:
15+
Detect the base branch from `gh pr view --json baseRefName` or fall back to `main`. Run `git diff origin/<base-branch> --name-only` and classify changed files:
1616

1717
| Type | Patterns | Gates to Run |
1818
|------|----------|--------------|

0 commit comments

Comments
 (0)