Skip to content

Conversation

@skylarkoo7
Copy link

Summary

Fixes #96.

The gh-address-comments skill instructs agents to run scripts/fetch_comments.py using a bare relative path. Since agents execute from the target repository working directory (not the skill directory), the script is never found — forcing a fallback to raw GraphQL that loses the structured output the skill was designed around.

The sibling skill gh-fix-ci already solved this by using <path-to-skill>/scripts/... references. This PR aligns gh-address-comments to the same pattern and adds the missing CLI interface.

Changes

SKILL.md — Rewrote the workflow section to reference the script with the <path-to-skill> prefix, added a Quick start block and Bundled Resources documentation matching the gh-fix-ci convention.

scripts/fetch_comments.py — Added argparse CLI with --repo, --pr, and --json flags. All gh and git subprocess calls now accept a cwd parameter resolved from --repo, so the script works when invoked from any directory. Added get_pr_ref_from_value() to resolve an explicit PR number or URL. Added render_text() for human-readable output (the default), with --json preserving the original raw JSON dump.

agents/openai.yaml — Fixed a missing opening quote on the short_description value (Address comments in a GitHub PR review""Address comments in a GitHub PR review").

Test plan

  • Install the skill and invoke it from a repo with an open PR; verify the script is found and comments are printed
  • Verify --pr <number> and --pr <URL> both resolve correctly
  • Verify --json outputs valid JSON to stdout
  • Verify the YAML parses without errors

The skill referenced scripts/fetch_comments.py as a bare relative path,
causing agents to look for it inside the target repo instead of the skill
directory.  This matches the pattern already used by gh-fix-ci.

- SKILL.md: use <path-to-skill>/scripts/fetch_comments.py consistently
- fetch_comments.py: add --repo, --pr, --json flags and working directory
  support so the script works when invoked from any location
- openai.yaml: fix missing opening quote on short_description value
@skylarkoo7 skylarkoo7 requested a review from a team February 9, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh-address-comments can’t find scripts/fetch_comments.py and falls back to GraphQL

1 participant