MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getStatusId

Function getStatusId

packages/integration-linear/src/helpers/linear.ts:116–134  ·  view source on GitHub ↗
({
  accessToken,
  status,
}: {
  accessToken: string;
  status: 'started' | 'completed';
})

Source from the content-addressed store, hash-verified

114}
115
116export async function getStatusId({
117 accessToken,
118 status,
119}: {
120 accessToken: string;
121 status: 'started' | 'completed';
122}) {
123 const linearClient = new LinearClient({ accessToken });
124
125 const states = await linearClient
126 .workflowStates({
127 includeArchived: false,
128 filter: { type: { eq: status } },
129 first: 1,
130 })
131 .then((r) => r?.nodes?.shift());
132
133 return states?.id;
134}

Callers 1

outbound.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected