soloscrum-tracker-github-query-state
Returns active work — items in state:in-progress or state:in-review. Active when tracker_profile = github-only.
Inputs
issue_number(optional) — narrow to one Issue's subtree
Steps
Fetch in-progress items:
gh issue list --state open --label "state:in-progress" \ --json number,title,labels,urlFetch in-review items:
gh issue list --state open --label "state:in-review" \ --json number,title,labels,urlFor each in-review item, attach its PR via
gh issue view <n> --json closingIssuesReferences,...orgh pr list --search "linked:<n>"For each item, classify Subtask vs no-Subtask Issue by fetching its
parentandsubIssuesSummaryvia the Sub-issues GraphQL preview (requires theGraphQL-Features: sub_issuesheader — the same header/soloscrum:refine's parent-detection path uses, but the per-Issue probe shape is different so the snippet is included here):gh api graphql \ -H "GraphQL-Features: sub_issues" \ -f query=' query($owner: String!, $repo: String!, $number: Int!) { repository(owner: $owner, name: $repo) { issue(number: $number) { parent { number } subIssuesSummary { total } } } }' -F owner=<owner> -F repo=<repo> -F number=<n>Classification predicates:
parent != null→ Subtask;parent == null AND subIssuesSummary.total == 0→ no-Subtask Issue;parent == null AND subIssuesSummary.total > 0→ parent Issue (not a/soloscrum:developtarget — surfaces only as context).(If
issue_numbergiven) restrict results to that Issue's Sub-issues
Output
Two grouped lists; each entry distinguishes Subtask vs no-Subtask Issue (per
soloscrum-define-branch-commit's case-split —/soloscrum:developaccepts either):In Progress: #200 (Subtask, develop) — Implement password reset endpoint #210 (Issue, develop) — Fix login crash on empty input In Review: #201 (Subtask, develop) — Add reset email template → PR #45 #212 (Issue, develop) — Cleanup legacy router → PR #50The per-entry
(Subtask, ...)/(Issue, ...)label comes from the step 4 classification.
Notes
- This is the basis for
/soloscrum:statusin github-only profile - For design-ui type Sub-issues in review, also surface the Figma URL if recorded in the body
- Querying
state:done: an Issue carrying thestate:donelabel can be either open (/soloscrum:reviewPass verdict reached, awaitinggh pr merge) or closed (PR merged viaCloses #N). To list "shippable but unmerged" Subtasks, usegh issue list --state open --label "state:done". To list fully shipped (since the label-based mapping was adopted), usegh issue list --state closed --label "state:done". - Backwards-compat: pre-label-mapping closed Subtasks have no
state:donelabel. Issues closed before this skill switched to label-baseddoneare not retroactively labelled. Treat the closed-without-label cohort as "historically shipped"; do not retro-apply the label. If a per-repo report needs the old cohort included, query closed Issues without the label filter and union with the labelled-closed set. Seesoloscrum-tracker-github-transition-statefor the full state mapping.