mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
⚡ Small adjustment on Github Credentials
This commit is contained in:
parent
a1d1f994f7
commit
28de43389e
|
@ -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',
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue