🔀 Fix Github Trigger node and add OAuth support (#643)

* Fixed bug with small name change in credentials

* Deleted Excess Commented Code

* Changed the code to give user options
This commit is contained in:
Erin McNulty 2020-06-09 16:50:09 -04:00 committed by GitHub
parent 516a56ea32
commit 62c8356566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,25 @@ export class GithubTrigger implements INodeType {
{
name: 'githubApi',
required: true,
}
displayOptions: {
show: {
authentication: [
'accessToken',
],
},
},
},
{
name: 'githubOAuth2Api',
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
},
},
},
],
webhooks: [
{
@ -45,6 +63,23 @@ export class GithubTrigger implements INodeType {
},
],
properties: [
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'Access Token',
value: 'accessToken',
},
{
name: 'OAuth2',
value: 'oAuth2',
},
],
default: 'accessToken',
description: 'The resource to operate on.',
},
{
displayName: 'Repository Owner',
name: 'owner',