Default issue sort to priority instead of requiring configuration#253
Merged
Conversation
Previously, commands listing issues required a sort order via the --sort flag, the configuration file, or the LINEAR_ISSUE_SORT environment variable, and errored out when none was provided. Fall back to priority sort instead so the commands work out of the box, and document the default in the --sort help text. Also ignore the .idea/ directory.
schpetbot
pushed a commit
that referenced
this pull request
Jul 23, 2026
…ting Add resolveIssueSort() so all issue-listing commands share one sort resolution path: --sort flag > LINEAR_ISSUE_SORT env > issue_sort config > priority default. Unlike the getOption fallback, an explicitly configured but invalid sort value now errors with guidance instead of silently sorting by priority; this also fixes the same latent silent downgrade in issue query. Also cover the gaps around the new default: a genuinely unconfigured subprocess test (the repo's own .linear.toml supplies issue_sort when tests run in-process, so the previous no-config tests were passing via that config file), a test that a configured sort order still wins over the default, and updated skill docs that no longer claim issue list requires a sort order.
schpetbot
pushed a commit
that referenced
this pull request
Jul 23, 2026
…ting Add resolveIssueSort() so all issue-listing commands share one sort resolution path: --sort flag > LINEAR_ISSUE_SORT env > issue_sort config > priority default. Unlike the getOption fallback, an explicitly configured but invalid sort value now errors with guidance instead of silently sorting by priority; this also fixes the same latent silent downgrade in issue query. Also cover the gaps around the new default: a genuinely unconfigured subprocess test (the repo's own .linear.toml supplies issue_sort when tests run in-process, so the previous no-config tests were passing via that config file), a test that a configured sort order still wins over the default, and updated skill docs that no longer claim issue list requires a sort order.
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.
linear issue mine/listandlinear issue startcurrently fail with "Sort must be provided..." unless a sort order is set via--sort, theissue_sortconfig key, orLINEAR_ISSUE_SORT. New users hit this error on the most basic commands before anything works.This makes the sort order default to
prioritywhen none is provided, matching the default the newerissue querycommand already uses, so sorting now behaves consistently across all issue-listing commands. Invalid explicit values still error as before.Changes
issue mine/listand the sharedfetchIssuesForState()helper (used byissue start) fall back topriorityinstead of throwing--sorthelp text documents the default; snapshots and the generated skill docs updated to matchissue minewith nothing configured sends a priority-sorted request;issue startworks without sort configuration.idea/to.gitignoreNote on behavior
Existing setups are unaffected: any configured flag, config key, or env var takes precedence exactly as before. Only the previously erroring "nothing configured" case changes, and it now behaves like
issue query.