feat(Linear Trigger Node): Add support for admin scope (#12211)
Some checks failed
Test Master / install-and-build (push) Has been cancelled
Test Master / Unit tests (18.x) (push) Has been cancelled
Test Master / Unit tests (20.x) (push) Has been cancelled
Test Master / Unit tests (22.4) (push) Has been cancelled
Test Master / Lint (push) Has been cancelled
Test Master / Notify Slack on failure (push) Has been cancelled

This commit is contained in:
Jon 2024-12-13 20:45:08 +00:00 committed by GitHub
parent 53365a2159
commit 410ea9a2ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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';
@ -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,
},
{