# Github Pr Workflow

> Working with GitHub Pull Requests using the gh CLI. Use for fetching PR details, review comments, CI status, and understanding the difference between PR-level comments vs inline code review comments.

- **Type:** Skill
- **Install:** `agentstack add skill-ypares-agent-skills-github-pr-workflow`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [YPares](https://agentstack.voostack.com/s/ypares)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [YPares](https://github.com/YPares)
- **Source:** https://github.com/YPares/agent-skills/tree/main/github-pr-workflow

## Install

```sh
agentstack add skill-ypares-agent-skills-github-pr-workflow
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# GitHub PR Workflow

## Key Concepts

### Comment Types

GitHub PRs have **two different types of comments**:

1. **PR-level comments** - General discussion on the PR (shown via `gh pr view --comments`)
2. **Inline code review comments** - Comments attached to specific lines of code (requires API)

**Important**: `gh pr view --comments` does NOT show inline code review comments!

## Scripts

| Script | Purpose |
|--------|---------|
| `gh-pr-info  [REPO]` | **Comprehensive PR info**: summary, CI checks and unresolved review and inline comments |

The script auto-detects the repo from git remote, or accepts `[REPO]` as second argument (format: `owner/repo`).

**Key features**:
- Uses GitHub's GraphQL API to reliably filter out already resolved/addressed comments
- Excludes collapsed/hidden review threads
- Excludes minimized comments (marked as spam/off-topic/resolved)
- Excludes dismissed reviews
- Shows only what still needs attention

## Common Commands

```bash
# Get complete PR info with UNRESOLVED comments only
gh-pr-info  [REPO]             # ✅ Everything you need: summary, checks, reviews, unresolved comments

# Basic PR info (native gh commands)
gh pr view                     # Overview
gh pr view  --comments         # PR-level comments only (NOT inline!)
gh pr diff                     # View the diff

# Reviews (approve/request changes)
gh pr review  --approve
gh pr review  --request-changes --body "Please fix X"
gh pr review  --comment --body "Looks good overall"

# Checks
gh pr checks                   # CI status
gh run view  --log-failed  # Failed job logs
```

## API Endpoints Reference

When `gh` commands don't expose what you need, use the API:

```bash
# Inline review comments
gh api repos/OWNER/REPO/pulls/PR/comments

# PR-level comments (issue comments)
gh api repos/OWNER/REPO/issues/PR/comments

# Review submissions
gh api repos/OWNER/REPO/pulls/PR/reviews

# Commits in PR
gh api repos/OWNER/REPO/pulls/PR/commits

# Files changed
gh api repos/OWNER/REPO/pulls/PR/files
```

## Workflow: Addressing Review Comments

1. **Get unresolved comments**: `gh-pr-info `
2. **Make fixes** in your local branch

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [YPares](https://github.com/YPares)
- **Source:** [YPares/agent-skills](https://github.com/YPares/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ypares-agent-skills-github-pr-workflow
- Seller: https://agentstack.voostack.com/s/ypares
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
