Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(ci): use gh pr checkout for fork PRs in claude-mention (#990)

Maximilian Roos4cf3c2779a27
diff --git a/.github/workflows/claude-mention.yaml b/.github/workflows/claude-mention.yaml
index b87095638..c5d2fea99 100644
--- a/.github/workflows/claude-mention.yaml
+++ b/.github/workflows/claude-mention.yaml
@@ -34,11 +34,7 @@ jobs:
- name: πŸ“‚ Checkout code
uses: actions/checkout@v6
with:
- # Fix: Checkout PR branch for issue_comment events instead of default branch
- ref:
- ${{ github.event.issue.pull_request && format('refs/pull/{0}/head',
- github.event.issue.number) || github.ref }}
- fetch-depth: 0 # Get more history for better context
+ fetch-depth: 0
fetch-tags: true
# Use bot token so pushed commits trigger CI workflows
token: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
@@ -48,6 +44,12 @@ jobs:
git config --global user.name "Claude Code"
git config --global user.email "[email protected]"
+ - name: πŸ“Œ Check out PR branch
+ if: github.event.issue.pull_request
+ run: gh pr checkout ${{ github.event.issue.number }}
+ env:
+ GH_TOKEN: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
+
- name: Install cargo-insta
uses: baptiste0928/cargo-install@v3
with: