Skip to content

Commit a8ebcc2

Browse files
authored
Merge branch 'main' into features/byo-auth
2 parents d303453 + 3e63a7e commit a8ebcc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5687
-145
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
"@trigger.dev/linear": patch
4+
---
5+
6+
First release of `@trigger.dev/linear` integration. `io.runTask()` error handlers can now prevent further retries.

.changeset/three-worms-impress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/stripe": patch
3+
---
4+
5+
Stripe will now fail client-side on invalid event names.

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ CLOUD_AIRTABLE_CLIENT_ID=
3131
CLOUD_AIRTABLE_CLIENT_SECRET=
3232
CLOUD_GITHUB_CLIENT_ID=
3333
CLOUD_GITHUB_CLIENT_SECRET=
34+
CLOUD_LINEAR_CLIENT_ID=
35+
CLOUD_LINEAR_CLIENT_SECRET=
3436
CLOUD_SLACK_APP_HOST=
3537
CLOUD_SLACK_CLIENT_ID=
3638
CLOUD_SLACK_CLIENT_SECRET=

apps/webapp/app/components/primitives/NamedIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const icons = {
7676
"arrow-left": (className: string) => <ArrowLeftIcon className={cn("text-white", className)} />,
7777
background: (className: string) => <CloudIcon className={cn("text-sky-400", className)} />,
7878
beaker: (className: string) => <BeakerIcon className={cn("text-purple-500", className)} />,
79+
bell: (className: string) => <BellAlertIcon className={cn("text-amber-500", className)} />,
7980
billing: (className: string) => <CreditCardIcon className={cn("text-teal-500", className)} />,
80-
8181
browser: (className: string) => <WindowIcon className={cn("text-dimmed", className)} />,
8282
calendar: (className: string) => (
8383
<CalendarDaysIcon className={cn("text-purple-500", className)} />

apps/webapp/app/services/externalApis/integrationCatalog.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { airtable } from "./integrations/airtable";
22
import { github } from "./integrations/github";
3+
import { linear } from "./integrations/linear";
34
import { openai } from "./integrations/openai";
45
import { plain } from "./integrations/plain";
56
import { resend } from "./integrations/resend";
@@ -33,6 +34,7 @@ export class IntegrationCatalog {
3334
export const integrationCatalog = new IntegrationCatalog({
3435
airtable,
3536
github,
37+
linear,
3638
openai,
3739
plain,
3840
resend,
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import type { HelpSample, Integration } from "../types";
2+
3+
function usageSample(hasApiKey: boolean): HelpSample {
4+
return {
5+
title: "Using the client",
6+
code: `
7+
import { Linear } from "@trigger.dev/linear";
8+
9+
const linear = new Linear({
10+
id: "__SLUG__",${hasApiKey ? ",\n apiKey: process.env.LINEAR_API_KEY!" : ""}
11+
});
12+
13+
client.defineJob({
14+
id: "linear-react-to-new-issue",
15+
name: "Linear - React To New Issue",
16+
version: "0.1.0",
17+
integrations: { linear },
18+
trigger: linear.onIssueCreated(),
19+
run: async (payload, io, ctx) => {
20+
await io.linear.createComment("create-comment", {
21+
issueId: payload.data.id,
22+
body: "Thank's for opening this issue!"
23+
});
24+
25+
await io.linear.createReaction("create-reaction", {
26+
issueId: payload.data.id,
27+
emoji: "+1"
28+
});
29+
30+
return { payload, ctx };
31+
},
32+
});
33+
`,
34+
};
35+
}
36+
37+
export const linear: Integration = {
38+
identifier: "linear",
39+
name: "Linear",
40+
packageName: "@trigger.dev/linear@latest",
41+
authenticationMethods: {
42+
oauth2: {
43+
name: "OAuth",
44+
type: "oauth2",
45+
client: {
46+
id: {
47+
envName: "CLOUD_LINEAR_CLIENT_ID",
48+
},
49+
secret: {
50+
envName: "CLOUD_LINEAR_CLIENT_SECRET",
51+
},
52+
},
53+
config: {
54+
authorization: {
55+
url: "https://linear.app/oauth/authorize",
56+
scopeSeparator: ",",
57+
},
58+
token: {
59+
url: "https://api.linear.app/oauth/token",
60+
metadata: {},
61+
},
62+
refresh: {
63+
url: "https://linear.app/oauth/authorize",
64+
},
65+
pkce: false,
66+
},
67+
scopes: [
68+
{
69+
name: "write",
70+
description:
71+
"Grants global write access to the user's account. Use a more targeted scope if you don't need full access.",
72+
defaultChecked: true,
73+
},
74+
75+
{
76+
name: "issue:create",
77+
description: "Grants access to create issues and attachments only.",
78+
annotations: [{ label: "Issues" }],
79+
},
80+
81+
{
82+
name: "comments:create",
83+
description: "Grants access to create new issue comments.",
84+
annotations: [{ label: "Comments" }],
85+
},
86+
87+
{
88+
name: "admin",
89+
description:
90+
"Grants full access to admin-level endpoints. Don't use this unless you really need it.",
91+
},
92+
],
93+
help: {
94+
samples: [usageSample(false)],
95+
},
96+
},
97+
apikey: {
98+
type: "apikey",
99+
help: {
100+
samples: [usageSample(true)],
101+
},
102+
},
103+
},
104+
};

docs/documentation/quickstarts/supabase.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ npx @trigger.dev/cli dev
147147

148148
Head back to your Supabase Dashboard -> Auth, and create a new user (keep "Auto Confirm User?" checked)
149149

150-
![create user](images/supabase-create-new-user.png)
150+
![create user](/images/supabase-create-new-user.png)
151151

152152
Then navigate over to your Trigger.dev project dashboard and you should see the job running.
153153

154-
![job running](images/supabase-job-running.png)
154+
![job running](/images/supabase-job-running.png)
155155

156156
## What's next?
157157

0 commit comments

Comments
 (0)