Issue tracker¶
Issues and specs for this repository live as GitHub issues. Use the gh command-line tool for all operations.
Conventions¶
- Create an issue:
gh issue create --title "..." --body "...". Write a body of several lines to a file and pass it with--body-file. - Read an issue:
gh issue view <number> --comments, filtering comments byjqand also fetching labels. - List issues:
gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'with appropriate--labeland--statefilters. - Make an issue a sub-issue of a parent:
gh issue create --parent <parent> ..., orgh issue edit <parent> --add-sub-issue <child>afterwards (gh2.94+). Oldergh:gh api --method POST repos/<owner>/<repo>/issues/<parent>/sub_issues -F sub_issue_id=<child-db-id>(database id, as in Blocking below). Without sub-issues, putPart of #<parent>at the top of the child body. - Comment on an issue:
gh issue comment <number> --body "..." - Apply / remove labels:
gh issue edit <number> --add-label "..."/--remove-label "..." - Close:
gh issue close <number> --comment "..."
Infer the repository from git remote -v; gh does this automatically when run inside a clone.
Pull requests as a triage surface¶
PRs as a request surface: no. (Set to yes if this repository treats external PRs as feature requests; /mattpocock-skills:triage reads this flag.)
When set to yes, PRs run through the same labels and states as issues, using the gh pr equivalents:
- Read a PR:
gh pr view <number> --commentsandgh pr diff <number>for the diff. - List external PRs for triage:
gh api --paginate 'repos/{owner}/{repo}/pulls?state=open' --jq '.[] | select(.author_association | IN("OWNER","MEMBER","COLLABORATOR") | not) | {number, title, author: .user.login, author_association, labels: [.labels[].name]}'. - Comment / label / close:
gh pr comment,gh pr edit --add-label/--remove-label,gh pr close.
GitHub shares one number space across issues and PRs, so a bare #42 may be either: resolve with gh pr view 42 and fall back to gh issue view 42.
When a skill says "publish to the issue tracker"¶
Create a GitHub issue.
When a skill says "fetch the relevant ticket"¶
Run gh issue view <number> --comments.
Operations of the wayfinder skill¶
Used by /mattpocock-skills:wayfinder. The map is a single issue with child issues as tickets.
- Map: a single issue labeled
wayfinder:map, holding the Notes / Decisions-so-far / Fog body.gh issue create --label wayfinder:map. - Child ticket: an issue linked to the map as a GitHub sub-issue (see Make an issue a sub-issue of a parent). Where sub-issues aren't enabled, add the child to a task list in the map body and put
Part of #<map>at the top of the child body. Labels:wayfinder:<type>(research/prototype/grilling/task). Once claimed, the ticket is assigned to the person driving it. - Blocking: the native issue dependencies of GitHub, the canonical, UI-visible representation. Add an edge with
gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>, where<blocker-db-id>is the blocker's numeric database id (gh api repos/<owner>/<repo>/issues/<n> --jq .id, not the#numberornode_id). GitHub reportsissue_dependencies_summary.blocked_by(open blockers only, the live gate). Where dependencies aren't available, fall back to aBlocked by: #<n>, #<n>line at the top of the child body. A ticket is unblocked when every blocker is closed. - Frontier query: list the map's open children (
gh issue list --state open, scoped to the map's sub-issues / task list), drop any with an open blocker (issue_dependencies_summary.blocked_by > 0, or an open issue in theBlocked byline) or an assignee; first in map order wins. - Claim:
gh issue edit <n> --add-assignee @me, the session's first write. - Resolve:
gh issue comment <n> --body "<answer>", thengh issue close <n>, then append a context pointer (gist + link) to the map's Decisions-so-far.