Values
ISSUE_FIELDS
ISSUE_FIELDS: Str "id\nidentifier\ntitle\ndescription\npriority\nurl\ncreatedAt\nstate { id name type }\nassignee { id name }\nteam { id key }\nlabels { nodes { id name } }"
Functions
archive-issue
fn (id: Str): Bool
fn (id: Str, opts: Map): Bool
Archive an issue (it stays queryable but leaves active views). Returns true on success.
Example
::linear::issues/archive-issue(::linear::issuesD)
build-create-input
fn (team-id: Str, title: Str, options: Map): Map
Build an IssueCreateInput from a team id, title, and options
(description, priority 0-4, assigneeId, stateId, labelIds,
projectId). Exposed for testing; create-issue uses it.
Example
::linear::issues/build-create-input("team-1", "Fix login", {priority: 2}) // {teamId: "team-1", title: "Fix login", priority: 2}
create-comment
fn (issue-id: Str, body: Str): Map
fn (issue-id: Str, body: Str, opts: Map): Map
Comment on an issue (markdown body).
Example
comment ::linear::issues/create-comment(::linear::issuesD, "Reproduced on **staging**.")
comment.url
create-issue
fn (team-id: Str, title: Str): Map
fn (team-id: Str, title: Str, options: Map): Map
fn (team-id: Str, title: Str, options: Map, opts: Map): Map
Create an issue in a team. See build-create-input for the options.
Example
team ::linear::teams/get-team-by-key("ENG")
issue ::linear::issues/create-issue(team.id, "Fix flaky webhook test", {priority: 2})
issue.identifier
delete-issue
fn (id: Str): Bool
fn (id: Str, opts: Map): Bool
Move an issue to the trash (recoverable in Linear for a grace period). Returns true on success.
Example
::linear::issues/delete-issue(::linear::issuesD)
get-issue
fn (id: Str): Map
fn (id: Str, opts: Map): Map
Fetch one issue by id or identifier (e.g. "ENG-123").
Example
issue ::linear::issues/get-issue(::linear::issuesD)
issue.state.name
list-comments
fn (issue-id: Str): Map
fn (issue-id: Str, options: Map): Map
fn (issue-id: Str, options: Map, opts: Map): Map
The comments on an issue. options (2-arity) supports first (page
size, default 50) and after (cursor). Returns {nodes: [{id, body, createdAt, user}], pageInfo: {hasNextPage, endCursor}}.
Example
comments ::linear::issues/list-comments(::linear::issuesD, {first: 20})
map(comments.nodes, %.body)
// The next page
more ::linear::issues/list-comments(::linear::issuesD, {first: 20, after: comments.pageInfo.endCursor})
list-issues
fn (): Map
fn (options: Map): Map
fn (options: Map, opts: Map): Map
List issues. options maps to the GraphQL issues arguments:
filter (an IssueFilter Map — https://developers.linear.app/docs/graphql/filtering),
first (page size, default 50), after (cursor), orderBy.
Returns {nodes: [...], pageInfo: {hasNextPage, endCursor}}.
Example
urgent ::linear::issues/list-issues({
filter: {priority: {lte: 2}, state: {type: {neq: "completed"}}},
first: 25
})
map(urgent.nodes, (i) { `${i.identifier}: ${i.title}` })
search-issues
fn (term: Str): Map
fn (term: Str, opts: Map): Map
Full-text issue search. Returns {nodes, pageInfo}.
Example
hits ::linear::issues/search-issues("rate limit")
map(hits.nodes, %.identifier)
update-issue
fn (id: Str, changes: Map): Map
fn (id: Str, changes: Map, opts: Map): Map
Update an issue's fields (IssueUpdateInput: title, description,
priority, stateId, assigneeId, ...).
Example
issue ::linear::issues/update-issue(::linear::issuesD, {priority: 1, title: "Fix login on Safari"})
issue.priority