Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/commands/issue/issue-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ export const listCommand = new Command()
console.error(`No projects found matching: ${project}`)
Deno.exit(1)
}
if (!Deno.stdin.isTerminal()) {
console.error(
`Project "${project}" not found. Similar projects: ${
Object.values(projectOptions).join(", ")
}`,
)
Deno.exit(1)
}
projectId = await selectOption("Project", project, projectOptions)
}
}
Expand All @@ -173,6 +181,7 @@ export const listCommand = new Command()
allAssignees,
limit === 0 ? undefined : limit,
projectId,
sort,
)
spinner?.stop()
const issues = result.issues?.nodes || []
Expand Down
6 changes: 4 additions & 2 deletions src/utils/linear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,13 @@ export async function fetchIssuesForState(
allAssignees = false,
limit?: number,
projectId?: string,
sortParam?: "manual" | "priority",
) {
const sort = getOption("issue_sort") as "manual" | "priority" | undefined
const sort = sortParam ??
getOption("issue_sort") as "manual" | "priority" | undefined
if (!sort) {
console.error(
"Sort must be provided via configuration file or LINEAR_ISSUE_SORT environment variable",
"Sort must be provided via --sort parameter, configuration file, or LINEAR_ISSUE_SORT environment variable",
)
Deno.exit(1)
}
Expand Down