Small adjustment on Github Credentials

This commit is contained in:
Jan Oberhauser 2020-04-03 11:48:34 +02:00
parent a1d1f994f7
commit 28de43389e
2 changed files with 4 additions and 3 deletions

View file

@ -8,10 +8,11 @@ export class GithubApi implements ICredentialType {
displayName = 'Github API';
properties = [
{
displayName: 'URL',
name: 'url',
displayName: 'Github Server',
name: 'server',
type: 'string' as NodePropertyTypes,
default: 'https://api.github.com',
description: 'The server to connect to. Does only have to get changed if Github Enterprise gets used.',
},
{
displayName: 'User',

View file

@ -21,7 +21,7 @@ export async function githubApiRequest(this: IHookFunctions | IExecuteFunctions,
if (credentials === undefined) {
throw new Error('No credentials got returned!');
}
const baseUrl = credentials!.url || 'https://api.github.com';
const baseUrl = credentials!.server || 'https://api.github.com';
const options = {
method,