Create Issue

Create an issue. See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)

Script linear Verified

by rubenustegnuti ยท 6/6/2022

The script

Submitted by hugo697 Bun
Verified 397 days ago
1
import { LinearClient } from '@linear/sdk'
2

3
type Linear = {
4
	apiKey: string
5
}
6

7
export async function main(resource: Linear, teamId: string, title: string) {
8
	const linearClient = new LinearClient({ apiKey: resource.apiKey })
9

10
	const createIssue = await linearClient.createIssue({
11
		teamId,
12
		title
13
	})
14

15
	return createIssue.issue
16
}
17