Skip to main content

linear.linear

Home > @runlightyear/linear > Linear

Linear class

This API is in beta and may contain contain bugs. Can be used in production with caution.

Connector to the Linear API

Signature:
declare class Linear extends GraphQLConnector 

Extends:

GraphQLConnector

Example 1

Import

import { Linear } from "@runlightyear/linear"

Example 2

Use in an action

defineAction({
name: "linearExample",
title: "Linear Example"
apps: ["linear"],
run: async ({ auths }) => {
const linear = new Linear({ auth: auths.linear });
}
}

Example 3

Create an issue

await linear.createIssue({ teamId: "<team id>", title: "New Issue" });

Constructors

ConstructorModifiersDescription
(constructor)(props)(BETA) Constructs a new instance of the Linear class

Properties

PropertyModifiersTypeDescription
authTypestaticAuthType(BETA)
OAuthstatictypeof LinearOAuth(BETA)

Comment Methods

MethodModifiersDescription
createComment(props)(BETA) Create a comment
getComment(props)(BETA) Get a comment
listComments(props)(BETA) List comments

GraphQL Methods

MethodModifiersDescription
execute(props)(BETA)

Helper Methods

MethodModifiersDescription
findIssueByIdentifier(props)(BETA) Find issue by identifier
findWorkflowStateByName(props)(BETA) Find workflow state by name

Issue Methods

MethodModifiersDescription
createIssue(props)(BETA) Create an issue
getIssue(props)(BETA) Get an issue
listIssues(props)(BETA) List issues
updateIssue(props)(BETA) Update an issue

Team Methods

MethodModifiersDescription
getTeam(props)(BETA) Get a team
listTeams(props)

(BETA) List teams

All teams whose issues can be accessed by the user. This might be different from administrableTeams, which also includes teams whose settings can be changed by the user.

User Methods

MethodModifiersDescription
getUser(props)(BETA) Get a user
listUsers(props)(BETA) List users

Workflow State Methods

MethodModifiersDescription
listWorkflowStates(props)(BETA) List workflow states

Other Methods

MethodModifiersDescription
getBaseUrl()(BETA)