Trigger Claude review on the PR for the current branch
Triggers a Claude review on the pull request for the current branch.
/plugin marketplace add bengous/claude-code-plugins/plugin install git-tools@bengous-pluginsThis command triggers a Claude review on the pull request associated with your current branch.
git branch --show-currentgit rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "none"Get the current branch name using git branch --show-current
Determine the PR branch name:
git rev-parse --abbrev-ref @{upstream} 2>/dev/nullorigin/branch-name), extract the branch name part (after /)Search for open PRs:
gh pr list --head "<branch-name>" --state open --json number,title
Handle the results:
Post the review trigger comment:
gh pr comment <pr-number> --body "@claude review"
Get and display the PR URL:
gh pr view <pr-number> --json url --jq '.url'
Confirm to user with PR number and URL
If any gh command fails:
gh auth status if it looks like an auth issue