Skip to content

Phase 5's read-only 'gh api .../pulls/<n>/comments --jq' is refused by the attribution hook as an unsigned post #135

Description

@dmccoystephenson

Template gap

Phase 5's prescribed command for reading a pull request's inline review comments is a read-only gh api call whose --jq template emits a literal Body: label:

gh api repos/<owner>/<repo>/pulls/<number>/comments \
  --jq '.[] | "File: \(.path)\nLine: \(.line)\nBody: \(.body)\n"'

Where an attribution hook is active, that command is refused with This gh command posts prose under <maintainer>'s GitHub identity but the body carries no attribution sign-off. The hook appears to match on gh api together with the word Body, and cannot distinguish a GET that formats a body field for display from a POST that supplies one. No phrasing satisfies it, because a GET has no body to sign.

The cost is not a blocked cycle — gh pr view <number> --comments returns the same information and is not refused — but a prescribed command that fails on first use, with a message pointing at attribution rather than at the real cause. That is easy to misread as a genuine policy violation, and easy to misread as evidence that the pull request has no review comments.

Suggested action

Replace the Phase 5 snippet with the forms that work:

gh pr view <number> --comments
gh pr view <number> --json reviews

and state what is lost: the path:line anchoring, which has to be recovered by reading each comment's quoted context. If per-file inline detail is genuinely needed, note that the --jq template must avoid emitting a literal Body: label — \(.path):\(.line) — \(.body) — so the hook does not match it. Worth stating explicitly that a refusal here is never evidence that no review comments exist.

Provenance

Routed upstream from dmccoystephenson/medieval-factions-dev-loop#46, where it was filed as template-rule. That instance has since been fixed locally — its Phase 5 no longer reaches for gh api at all — but the snippet is inherited from create-dev-loop.md, so every other generated skill still carries it.

This issue was filed during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions