feat(linear): add MCP-style save issue (#9670)
* feat(linear): add MCP-style save issue * fix(linear): harden save issue parity * fix(linear): close save issue contract gaps * docs(linear): bundle project discovery with save issue
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
LinearIssueContextResult,
|
||||
LinearIssueTaskUpdateResult,
|
||||
LinearIssueRelationWriteResult,
|
||||
LinearSaveIssueResult,
|
||||
LinearProjectListResult,
|
||||
LinearSearchIssueSummary,
|
||||
LinearSearchResult,
|
||||
@@ -157,13 +158,20 @@ export function formatLinearAttach(result: LinearAttachResult): string {
|
||||
return `Attached ${result.attachment.title} to ${result.issue.identifier}${suffix}.`
|
||||
}
|
||||
|
||||
export function formatLinearCreate(result: LinearCreateResult): string {
|
||||
export function formatLinearCreate(result: LinearCreateResult | LinearSaveIssueResult): string {
|
||||
const parent = result.issue.parent ? ` under ${result.issue.parent.identifier}` : ''
|
||||
const project = result.issue.project?.name ? ` in ${result.issue.project.name}` : ''
|
||||
const suffix = result.meta.deduplicated ? ' (already created)' : ''
|
||||
return `Created ${result.issue.identifier}${parent}${project}: ${result.issue.title}${suffix}.`
|
||||
}
|
||||
|
||||
export function formatLinearSaveIssue(result: LinearSaveIssueResult): string {
|
||||
if (result.meta.created) {
|
||||
return formatLinearCreate(result)
|
||||
}
|
||||
return `Saved ${result.issue.identifier}: ${result.issue.title}.`
|
||||
}
|
||||
|
||||
export function formatLinearTaskUpdate(result: LinearIssueTaskUpdateResult): string {
|
||||
const suffix = result.meta.alreadySet ? ' (already set)' : ''
|
||||
return `Updated ${result.issue.identifier} ${taskOperationLabel(result.operation)}${suffix}.`
|
||||
|
||||
Reference in New Issue
Block a user