Skip to content
Merged
Changes from all commits
Commits
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
16 changes: 9 additions & 7 deletions plugins/sentry-skills/skills/create-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ If the output shows any uncommitted changes (modified, added, or untracked files
### Step 1: Verify Branch State

```bash
# Detect the default branch
BASE=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
# Detect the default branch — note the output for use in subsequent commands
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
```

# Check current branch and status
```bash
# Check current branch and status (substitute the detected branch name above for BASE)
git status
git log $BASE..HEAD --oneline
git log BASE..HEAD --oneline
Comment on lines 34 to +35
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The create-pr skill uses the literal string "BASE" in git commands, expecting an AI to substitute it. This will fail at runtime as "BASE" is not a valid git revision.
Severity: CRITICAL

Suggested Fix

Revert to using standard bash variable substitution. Define the base branch using a command like BASE=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name) and then use the $BASE variable in subsequent git commands to ensure a valid branch name is used.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: plugins/sentry-skills/skills/create-pr/SKILL.md#L34-L35

Potential issue: The `create-pr/SKILL.md` file was updated to use the literal string
`"BASE"` as a placeholder in `git log BASE..HEAD` and `git diff BASE...HEAD` commands.
The skill's instructions direct an AI agent to substitute this placeholder with a branch
name derived from a previous command. However, this substitution mechanism is not
supported. As a result, the `git` commands will be executed literally, causing them to
fail at runtime with a `fatal: ambiguous argument 'BASE': unknown revision` error. This
breaks the `create-pr` skill.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an AI so it will know to substitute BASE for what we ran above

```

Ensure:
Expand All @@ -43,11 +45,11 @@ Ensure:
Review what will be included in the PR:

```bash
# See all commits that will be in the PR
git log $BASE..HEAD
# See all commits that will be in the PR (substitute detected branch name for BASE)
git log BASE..HEAD

# See the full diff
git diff $BASE...HEAD
git diff BASE...HEAD
```

Understand the scope and purpose of all changes before writing the description.
Expand Down