-
Notifications
You must be signed in to change notification settings - Fork 22
fix: pass sort parameter to fetchIssuesForState #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
schpet
left a comment
There was a problem hiding this 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
| ) { | ||
| 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") | ||
| } |
There was a problem hiding this comment.
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) | ||
| } | ||
| } |
There was a problem hiding this comment.
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?
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>
0cb2055 to
e6a40bb
Compare
Summary
--sortflag was ignored after interactive prompts (like project selection)issue-list.tsbutfetchIssuesForStateindependently read sort from config only, causing the CLI flag to be lostTest plan
linear issue list --project <partial-name> --sort manual --team <team>and confirm project prompt, then verify sort works🤖 Generated with Claude Code