feat(KB-052): refactor GitHub integration to use gh CLI

- Create gh-cli utility module with auth detection and command execution
- Refactor GitHubClient to use gh CLI commands with REST API fallback
- Refactor PR Monitor to use gh CLI for PR operations
- Add listIssues() and getIssue() methods to GitHubClient
- Remove in-app GitHubRateLimiter (gh CLI handles rate limiting)
- Update all tests for gh CLI implementation
- Update AGENTS.md and extension docs for gh CLI auth preference
This commit is contained in:
gsxdsm
2026-03-29 20:52:07 -07:00
parent 6f43bdcdf4
commit 0e26d1df30
13 changed files with 1718 additions and 256 deletions

View File

@@ -440,7 +440,8 @@ export default function kbExtension(pi: ExtensionAPI) {
promptSnippet: "Import GitHub issues as kb tasks",
promptGuidelines: [
"Use for syncing GitHub issue backlog to kb board",
"Requires GITHUB_TOKEN env var for private repositories",
"Uses gh CLI authentication when available (run 'gh auth login')",
"Falls back to GITHUB_TOKEN env var for private repositories without gh CLI",
"Use --limit to control how many issues to import (default: 30)",
"Use --labels to filter by specific labels",
],
@@ -528,7 +529,8 @@ export default function kbExtension(pi: ExtensionAPI) {
promptSnippet: "Import a specific GitHub issue as a kb task",
promptGuidelines: [
"Use for importing a single known issue by its number",
"Requires GITHUB_TOKEN env var for private repositories",
"Uses gh CLI authentication when available (run 'gh auth login')",
"Falls back to GITHUB_TOKEN env var for private repositories without gh CLI",
"Skips import if the issue is already imported (checks for existing Source URL)",
],
parameters: Type.Object({