Skip to content

Default issue sort to priority instead of requiring configuration#253

Merged
schpetbot merged 1 commit into
schpet:mainfrom
friederbluemle:default-sort
Jul 23, 2026
Merged

Default issue sort to priority instead of requiring configuration#253
schpetbot merged 1 commit into
schpet:mainfrom
friederbluemle:default-sort

Conversation

@friederbluemle

Copy link
Copy Markdown
Contributor

linear issue mine/list and linear issue start currently fail with "Sort must be provided..." unless a sort order is set via --sort, the issue_sort config key, or LINEAR_ISSUE_SORT. New users hit this error on the most basic commands before anything works.

This makes the sort order default to priority when none is provided, matching the default the newer issue query command already uses, so sorting now behaves consistently across all issue-listing commands. Invalid explicit values still error as before.

Changes

  • issue mine/list and the shared fetchIssuesForState() helper (used by issue start) fall back to priority instead of throwing
  • --sort help text documents the default; snapshots and the generated skill docs updated to match
  • Tests: issue mine with nothing configured sends a priority-sorted request; issue start works without sort configuration
  • Adds .idea/ to .gitignore

Note 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.

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
schpetbot merged commit b4013c9 into schpet:main Jul 23, 2026
11 checks passed
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.
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.

2 participants