mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-03 17:07:29 -08:00
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
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:
parent
53365a2159
commit
410ea9a2ef
|
@ -1,7 +1,5 @@
|
||||||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
const scopes = ['read', 'write', 'issues:create', 'comments:create'];
|
|
||||||
|
|
||||||
export class LinearOAuth2Api implements ICredentialType {
|
export class LinearOAuth2Api implements ICredentialType {
|
||||||
name = 'linearOAuth2Api';
|
name = 'linearOAuth2Api';
|
||||||
|
|
||||||
|
@ -50,11 +48,19 @@ export class LinearOAuth2Api implements ICredentialType {
|
||||||
],
|
],
|
||||||
default: 'user',
|
default: 'user',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Include Admin Scope',
|
||||||
|
name: 'includeAdminScope',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description: 'Grants the "Admin" scope, Needed to create webhooks',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Scope',
|
displayName: 'Scope',
|
||||||
name: 'scope',
|
name: 'scope',
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: scopes.join(' '),
|
default:
|
||||||
|
'={{$self["includeAdminScope"] ? "read write issues:create comments:create admin" : "read write issues:create comments:create"}}',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue