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'; displayName = 'Github API';
properties = [ properties = [
{ {
displayName: 'URL', displayName: 'Github Server',
name: 'url', name: 'server',
type: 'string' as NodePropertyTypes, type: 'string' as NodePropertyTypes,
default: 'https://api.github.com', default: 'https://api.github.com',
description: 'The server to connect to. Does only have to get changed if Github Enterprise gets used.',
}, },
{ {
displayName: 'User', displayName: 'User',

View file

@ -21,7 +21,7 @@ export async function githubApiRequest(this: IHookFunctions | IExecuteFunctions,
if (credentials === undefined) { if (credentials === undefined) {
throw new Error('No credentials got returned!'); 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 = { const options = {
method, method,