Gh Pr Metadata

Internal executor for pull request metadata terminal commands using gh CLI.

gustavo-gardusi Updated

File contents

PR Metadata (internal)

Internal executor for the public @gh-pr boundary.

Responsibility

  • Own runnable terminal commands for PR discovery/create/update.
  • Use full base...HEAD scope for title/body synthesis.
  • Do not push commits in this executor.

Command runbook

1) Preconditions

BRANCH=$(git branch --show-current)
  • Stop if current branch is main.

2) Resolve existing PR for branch

gh pr view --json number,title,baseRefName,headRefName

If this fails for missing PR, prepare create path.

3) Build metadata

  • Ask whether a PR template is required.
  • Build title/body from full diff context (base...HEAD) and user/template rules.

4) Execute create/update

Update existing PR:

gh pr edit --title "<title>" --body "<body>"

Create new PR:

gh pr create --title "<title>" --body "<body>"

5) Report

Return PR URL/number and applied metadata summary.

gustavo-gardusi/cursor-skills/tree/main/skills/internal/gh/pr-metadata commit 16c3b65919

Frequently asked questions

npx skillmds@latest add gustavo-gardusi/gh-pr-metadata