Skip to content

fix: correct incompatible gh api flags in uf.triage-issue #712

Closed

Description

@yvonnedevlinrh

Summary

The /uf.triage-issue command cannot fetch issue comments because its Phase 1.1 example combines gh api --slurp with --jq:

gh api --paginate --slurp \
  "repos/{owner}/{repo}/issues/<ISSUE_NUMBER>/comments?per_page=100" \
  --jq 'flatten | map({id, created_at, body})'

GitHub CLI treats --slurp as incompatible with --jq and exits before retrieving comments.

Impact

Triage stops during ingestion for issues that reach the comment-fetch step. No issue-content profile, reviewer dispatch, classification, or artifact can be completed.

The same instruction appears in the upstream main branch at:

  • .opencode/commands/uf.triage-issue.md

Proposed Change

Keep --slurp for pagination aggregation and perform the transformation with external jq:

set -o pipefail
gh api --paginate --slurp \
  "repos/{owner}/{repo}/issues/<ISSUE_NUMBER>/comments?per_page=100" \
  | jq 'flatten | map({id, created_at, body})'

pipefail ensures an API failure from gh is not masked by the pipeline.

Acceptance Criteria

  • The command no longer combines gh api --slurp with --jq.
  • All comment pages are retrieved and flattened.
  • Output retains only id, created_at, and body.
  • A gh api failure remains detectable.
  • The command documents or verifies the required external jq dependency.

Activity

  1. added a commit that references this issue on Oct 13, 2026
    dc2eae2
  2. self-assigned this
    on Oct 13, 2026
  3. added a commit that references this issue on Oct 13, 2026
    988ccab
  4. added a commit that references this issue on Oct 14, 2026
    b58ef6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions