Skip to content

Add --json to team list, cycle list/view, milestone list/view, project view - #277

Merged
schpetbot merged 1 commit into
mainfrom
schpet/push-wykmssvwntop
Sep 3, 2026
Merged

Add --json to team list, cycle list/view, milestone list/view, project view#277
schpetbot merged 1 commit into
mainfrom
schpet/push-wykmssvwntop

Conversation

@schpetbot

Copy link
Copy Markdown
Collaborator

Adds -j, --json to the six read commands that still lacked machine-readable output: team list, cycle list, cycle view, milestone list, milestone view, and project view. team list was the motivating case (the only place to map a team name to its key and id, and previously table-only); the other five came out of the sweep you asked for in #276.

  • List commands emit { nodes, pageInfo } after the same filtering and ordering as the table (archived teams hidden, cycles newest-first, milestones by target date with undated last).
  • View commands emit the GraphQL object as fetched: every issue rather than the ten-item preview, and milestone view --all --json includes every page.
  • Deviates from the issue's proposed five-field shape on purpose: JSON carries every field the query already selects, per the repo's "preserve GraphQL names and nesting" rule.
  • Goes beyond the literal ask in one place: cycle list and milestone list were taking Linear's default page with no cursor, silently dropping everything past 50. Adding JSON would have made that easier to consume without making it safer, so both now paginate (and fail loudly if Linear advertises a page without a cursor). cycle view and project view gain pageInfo on their issues connection so callers can see when a page was partial.
  • issue mine is deliberately untouched; issue query is its JSON surface.
  • Docs, changelog, and generated skill references updated. The changelog notes that the 2.0.0 entry claiming cycle list --json never actually landed (that merge only touched SVGs).

Fixes #276

https://claude.ai/code/session_01A9qEGri4p2HZMQSuYsBmub

…t view

Scripts need to map a team name to its key and id, and team list was the
only way to see both, so they had to scrape its table. It was also the last
list command without JSON. The maintainer asked to sweep the other commands
in the same state; the survey found cycle list, cycle view, milestone list,
milestone view, and project view, so all six get -j, --json here. issue mine
stays human-only on purpose (issue query is its JSON surface).

The reporter proposed a five-field subset for team list. The JSON instead
carries every field the query already selects, per the repository rule to
preserve GraphQL names and nesting rather than invent CLI shapes. Lists emit
{ nodes, pageInfo } after the same filtering and ordering as the table, so
archived teams stay hidden and cycles stay newest-first. Views emit the
object as fetched, including every issue rather than the ten-item preview,
and milestone view --all --json includes every page.

Two of these queries took Linear's default page with no cursor: cycle list
and milestone list silently dropped everything past fifty. Adding JSON would
have made that easier to consume without making it safer, so both now
paginate and fail loudly if Linear advertises a page without a cursor. The
view queries gain pageInfo on their issues connection so callers can see
when a page was partial. A 2.0.0 changelog entry claimed cycle list --json;
that merge only touched SVG files, so this is the first time it ships.

Github-Issue: Fixes #276
Github-Issue-Url: #276

Claude-Session: https://claude.ai/code/session_01A9qEGri4p2HZMQSuYsBmub
@schpetbot
schpetbot merged commit 6684ffe into main Sep 3, 2026
15 checks passed
@schpetbot
schpetbot deleted the schpet/push-wykmssvwntop branch September 3, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

team list: add --json output

2 participants