Skip to content

Conversation

@paymog
Copy link
Contributor

@paymog paymog commented Jan 20, 2026

Summary

  • Fixes a bug where --sort flag was ignored after interactive prompts (like project selection)
  • The sort option was validated in issue-list.ts but fetchIssuesForState independently read sort from config only, causing the CLI flag to be lost

Test plan

  • Run linear issue list --project <partial-name> --sort manual --team <team> and confirm project prompt, then verify sort works

🤖 Generated with Claude Code

Copy link
Owner

@schpet schpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! can you please get this up-to-date with main (rebase or merge in main) – i noted a couple things too

Comment on lines 364 to 373
) {
const sort = getOption("issue_sort") as "manual" | "priority" | undefined
if (!sort) {
console.error(
"Sort must be provided via configuration file or LINEAR_ISSUE_SORT environment variable",
)
Deno.exit(1)
throw new Error("sort parameter is required")
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue_sort is generally intended to be set in a repo level config file, can we keep the old behaviour here and maybe just update the message, e.g. 'Sort must be provided via --sort parameter, configuration file or LINEAR_ISSUE_SORT environment variable'

}
projectId = await selectOption("Project", project, projectOptions)
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make sure this select option is gated behind an 'isTerminal' type check so agents don't run into it?

paymog and others added 2 commits January 22, 2026 12:51
The sort option was being validated in issue-list.ts but fetchIssuesForState
was independently reading sort from config only, causing the --sort flag
to be ignored after interactive prompts (like project selection).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Restore config fallback in fetchIssuesForState, update error message
  to mention --sort parameter
- Gate selectOption behind isTerminal check for non-interactive use

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@paymog paymog force-pushed the feat/issue-list-project-filter branch from 0cb2055 to e6a40bb Compare January 22, 2026 18:51
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