gh-create-issue: consolidate Phase 2 investigate calls (#36) - #39
Conversation
Consolidates the 4-5 separate gh calls described in gh-create-issue/ SKILL.md Phase 2 (overlap search, open issues, open PRs, labels, milestones) into a single gather_context() call returning one JSON payload. Implemented against the frozen test suite in scripts/tests/test_gh_create_issue_context.py.
Test-first via test-implementer, implemented against in 6b2f24d.
📝 WalkthroughWalkthroughChangesThe PR adds a Python CLI that gathers open issues, pull requests, labels, milestones, and optional search results through GitHub API calls. It emits one JSON object. The issue-investigation skill now invokes this script. Issue context gathering
Sequence Diagram(s)sequenceDiagram
participant Investigator
participant ContextCLI as gh-create-issue-context.py
participant GitHubAPI as GitHub API
Investigator->>ContextCLI: Run with repository and optional keywords
ContextCLI->>GitHubAPI: Fetch issues, pull requests, labels, and milestones
opt Keywords supplied
ContextCLI->>GitHubAPI: Search issues
end
GitHubAPI-->>ContextCLI: Return datasets
ContextCLI-->>Investigator: Print one JSON context object
Merge Risk: 🟡 Moderate · up to The new context script can fail at runtime when GitHub returns multiple pages of results, preventing issue creation workflows from gathering context; merge should wait for the pagination parsing fix and regression coverage. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d4f935c6-8890-430e-9db5-97b935ab243c
📒 Files selected for processing (3)
scripts/gh-create-issue-context.pyscripts/tests/test_gh_create_issue_context.pyskills/gh-create-issue/SKILL.md
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.
|
Re: CodeRabbit's pagination finding — not implementing this in scope for #39.
If this turns out to be wrong (real multi-page repos actually break), it's a bug in the shared 🤖 Generated by Claude Code on behalf of @cbeaulieu-gt |
Summary
scripts/gh-create-issue-context.py(gather_context(repo, search_keywords=None)) — consolidates the 4-5 separateghcalls ingh-create-issue/SKILL.mdPhase 2 (overlap search, open issues, open PRs, labels, milestones) into one call emitting a single JSON payload.ghcall entirely when no keywords are given (not just returns empty).open_issues(GitHub's/issuesendpoint includes PRs).jq=".items"server-side for the search endpoint so it correctly unwraps the real/search/issuesenvelope.skills/gh-create-issue/SKILL.mdPhase 2 to consume the script's output. The overlap-judgment call stays with the LLM — the script only surfaces keyword-matched candidates.Test plan
pytest— 231 passed (211 pre-existing + 20 new, test-first viatest-implementer)ruff check scripts/— cleanCloses #36
🤖 Generated by Claude Code on behalf of @cbeaulieu-gt
Summary by CodeRabbit
New Features
Documentation
Tests