Pull Request Operations
GitHub PR capabilities exposed by Piaf through the `gh` CLI.
Available PR Capabilities
Piaf's GitHub service includes:
- Detecting the PR for the current branch.
- Retrieving a PR by number.
- Listing open PRs (configurable limit).
- Opening a PR in the browser.
- Retrieving PR CI status.
- Synchronizing files marked as viewed/unviewed.
File-by-File Review Management
For PRs, Piaf uses the GitHub GraphQL API via gh api graphql to:
- read file
viewerViewedState, - mark a file as viewed,
- remove the viewed mark.
Target Branch and Repository Info
Piaf retrieves:
- the repository default branch (
gh repo view --json defaultBranchRef), - owner/repo (
gh repo view --json owner,name).
As a fallback, if the default branch cannot be read through gh, Piaf tries git symbolic-ref refs/remotes/origin/HEAD.