feat: add --json flag to issue list, issue create, and cycle list#179
Open
mihai-chiorean wants to merge 2 commits intoschpet:mainfrom
Open
feat: add --json flag to issue list, issue create, and cycle list#179mihai-chiorean wants to merge 2 commits intoschpet:mainfrom
mihai-chiorean wants to merge 2 commits intoschpet:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--json/-jflag to three commands that were missing structured output support:issue list --json— outputs issues as a JSON array withid,identifier,title,priority,estimate,state,labels,assignee, andupdatedAtissue create --json— outputs the created issue'sid,identifier,url, andteamas JSON (non-interactive path only)cycle list --json— outputs cycles as a JSON array withid,number,name,startsAt,endsAt,completedAt,isActive,isFuture,isPast, andstatusWhen
--jsonis set, the spinner is suppressed and empty results output[]instead of human-readable messages.This is particularly useful for AI agents and automation that need to parse CLI output programmatically. The
linear apiraw GraphQL command works as a workaround today, but first-class--jsonsupport on list/create commands is much more ergonomic.Related: #127 (requests
--jsonon project commands — this PR covers issue and cycle commands using the same pattern)Test plan
issue list --jsonwith mock serverissue create --jsonwith mock servercycle list --jsonwith mock serverdeno fmtcleandeno lintclean