Skip to content

Commit

Permalink
feat(Linear Trigger Node): Add support for admin scope (#12211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored Dec 13, 2024
1 parent 53365a2 commit 410ea9a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/nodes-base/credentials/LinearOAuth2Api.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

const scopes = ['read', 'write', 'issues:create', 'comments:create'];

export class LinearOAuth2Api implements ICredentialType {
name = 'linearOAuth2Api';

Expand Down Expand Up @@ -50,11 +48,19 @@ export class LinearOAuth2Api implements ICredentialType {
],
default: 'user',
},
{
displayName: 'Include Admin Scope',
name: 'includeAdminScope',
type: 'boolean',
default: false,
description: 'Grants the "Admin" scope, Needed to create webhooks',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: scopes.join(' '),
default:
'={{$self["includeAdminScope"] ? "read write issues:create comments:create admin" : "read write issues:create comments:create"}}',
required: true,
},
{
Expand Down

0 comments on commit 410ea9a

Please sign in to comment.