feat: default sort to priority and auto-detect team in issue list#187
Draft
jholm117 wants to merge 1 commit intoschpet:mainfrom
Draft
feat: default sort to priority and auto-detect team in issue list#187jholm117 wants to merge 1 commit intoschpet:mainfrom
jholm117 wants to merge 1 commit intoschpet:mainfrom
Conversation
Instead of hard-erroring when --sort or --team are omitted from `issue list`, provide sensible defaults: - --sort: falls back to "priority" when not set via flag, config, or env var - --team: when not configured, fetches the viewer's teams. If the user belongs to one team, uses it automatically. If multiple teams exist, prompts interactively (or errors with a helpful list in non-TTY mode). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
--sortdefault: When no sort is specified via flag, config file (issue_sort), or env var (LINEAR_ISSUE_SORT), defaults to"priority"instead of throwing aValidationError.--teamauto-detection: When no team is configured via--teamflag orteam_idconfig, fetches the authenticated user's teams via theviewer { teams }GraphQL query:Both the command-level validation in
issue-list.tsand thefetchIssuesForStatehelper inlinear.tswere updated to use the"priority"fallback consistently.Test plan
deno check src/main.tspassesdeno lintpassesdeno task testpasses (one pre-existingproject-createport-conflict failure, unrelated)linear issue listwith no--sortflag and no config -- should default to priority sortlinear issue listwith no--teamand no config -- should auto-detect or promptlinear issue list --sort manual-- should still work as beforelinear issue list --team XYZ-- should still work as before🤖 Generated with Claude Code