Files

61 lines
2.8 KiB
JSON

{
"schema": 1,
"id": "github",
"name": "GitHub",
"version": "1.0.0",
"description": "Pull request pills on the conversations about them: links, gh pr view, Claude Code's own PR link.",
"category": "dev",
"icon": "git-pull-request",
"color": "#393b4a",
"author": "gabrielvidal",
"settings": {
"subtitle": "Which conversations show pull request pills",
"fields": [
{ "key": "githubRepo", "label": "Default repository", "type": "text", "default": "",
"help": "owner/repo that a bare #13722 or `gh pr view 13722` belongs to when the conversation never names its repo. Empty = such PRs stay #13722 until a link names the repo." },
{ "key": "workers", "label": "Runners", "type": "list", "default": [],
"help": "Runner ids whose conversations show PR pills (local = the lab). Empty = every runner." },
{ "key": "cwdGlobs", "label": "Folders", "type": "list", "default": [],
"help": "Working-directory globs (~/work/acme*). Empty = conversations anywhere." },
{ "key": "notifPills", "label": "Pills on notifications", "type": "checkbox", "default": false,
"help": "Also show the PR pill on these conversations' push notifications." }
]
},
"resources": [
{
"id": "pr",
"label": "Pull request",
"urlRegex": "^https://github\\.com/(?P<repo>[\\w.-]+/[\\w.-]+)/pulls?/(?P<num>\\d{1,7})",
"idRegex": "^(?:(?P<repo>[\\w.-]+/[\\w.-]+))?#(?P<num>\\d{1,7})$",
"idTemplate": ["{repo|config.githubRepo}#{num}", "#{num}"],
"urlTemplate": "https://github.com/{repo|config.githubRepo}/pull/{num}",
"labelTemplate": "#{num}",
"titleToken": "#{num}",
"needles": ["#{num}", "pull/{num}", "pr {num}", "pr #{num}"],
"ignoreUrlRegex": "^https://github\\.com/(?![\\w.-]+/[\\w.-]+/(?:pulls?|issues)/\\d)",
"toolExtractors": [
{
"tool": "shell",
"commandRegex": "\\bgh\\s+pr\\s+(?:view|checks|diff|checkout|merge|review|comment|edit|ready)\\s+(?:(?P<url>https://github\\.com/\\S+)|#?(?P<num>\\d{1,7}))(?:[^\\n;&|]*?(?:--repo|-R)[\\s=]+(?P<repo>[\\w.-]+/[\\w.-]+))?",
"tagOnCall": true
},
{
"tool": "shell",
"commandRegex": "\\bgh\\s+pr\\s+view\\s+(?:(?P<url>https://github\\.com/\\S+)|#?(?P<num>\\d{1,7}))(?:[^\\n;&|]*?(?:--repo|-R)[\\s=]+(?P<repo>[\\w.-]+/[\\w.-]+))?",
"urlFields": ["url"],
"titleFields": ["title"],
"stateFields": ["state"],
"stateFlags": { "isDraft": "draft" },
"xrefFields": ["headRefName", "body"]
}
],
"icon": "git-pull-request",
"color": "sky",
"stateTones": { "open": "emerald", "draft": "zinc", "merged": "violet", "closed": "rose" },
"clickAction": "open",
"priority": 20,
"hueRole": "shade"
}
]
}