Gh Pr Review

Submit pull request reviews (approve, comment, or request changes) using gh CLI.

dceoy b9b15bb 1.0 KB Updated

File contents

GitHub PR Review

When to use

  • The user asks to approve, comment on, or request changes for a PR.

Inputs to confirm

  • PR number/URL/branch (or use current branch PR).
  • Review type: approve, comment, or request changes.
  • Review body text (or file).

Workflow

  1. Verify auth:
    gh --version
    gh auth status
    
  2. Submit review:
    gh pr review 123 --approve --body "LGTM"
    gh pr review 123 --comment --body "Looks good, minor nits below"
    gh pr review 123 --request-changes --body "Please add tests"
    
  3. Confirm status:
    gh pr view 123 --json reviewDecision
    

Examples

# Approve current branch PR
~ gh pr review --approve --body "LGTM"

Notes

  • You cannot approve your own PR.
  • Use --body-file to provide longer feedback.

References

dceoy/github-cli-agent-skills/tree/main/skills/gh-pr-review commit b9b15bbf4f

Frequently asked questions

npx skillmds@latest add dceoy/gh-pr-review