Functions
get-team-by-key
fn (key: Str): Any
fn (key: Str, opts: Map): Any
Find a team by its key (the "ENG" in "ENG-123"). Returns the team or null.
Example
team ::linear::teams/get-team-by-key("ENG")
if(is-null(team), "no such team", team.id)
list-labels
fn (team-id: Str): Map
fn (team-id: Str, opts: Map): Map
A team's issue labels ({nodes: [{id, name, color}], ...}). Label ids
feed create-issue({labelIds: [...]}).
Example
labels ::linear::teams/list-labels(::linear::teamsM)
map(labels.nodes, %.name)
list-states
fn (team-id: Str): Map
fn (team-id: Str, opts: Map): Map
A team's workflow states ({id, name, type}; types:
triage/backlog/unstarted/started/completed/canceled). State ids drive
update-issue({stateId: ...}).
Example
states ::linear::teams/list-states(::linear::teamsM)
find-first(states.nodes, (s) { eq(s.type, "completed") })
list-teams
fn (): Map
fn (opts: Map): Map
List teams ({nodes: [{id, key, name}], ...}). Team ids are what
create-issue needs.
Example
teams ::linear::teams/list-teams()
map(teams.nodes, %.key)
viewer
fn (): Map
fn (opts: Map): Map
The authenticated user ({id, name, email}). The cheapest way to
smoke-test a key.
Example
me ::linear::teams/viewer()
me.email