Small fixes to Gitlab node before merge

This commit is contained in:
Jan Oberhauser 2019-10-25 08:15:36 +02:00
parent eb2425cc4f
commit 4ebdffd0dd
3 changed files with 5 additions and 4 deletions

View file

@ -29,7 +29,7 @@ export async function gitlabApiRequest(this: IHookFunctions | IExecuteFunctions,
},
body,
qs: query,
uri: `${(credentials.server as string).replace(/\/$/, '')}/api/v4/${endpoint}`,
uri: `${(credentials.server as string).replace(/\/$/, '')}/api/v4${endpoint}`,
json: true
};

View file

@ -21,6 +21,7 @@ export class Gitlab implements INodeType {
icon: 'file:gitlab.png',
group: ['input'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Retrieve data from Gitlab API.',
defaults: {
name: 'Gitlab',
@ -733,7 +734,7 @@ export class Gitlab implements INodeType {
description: 'Sort by priority.'
},
],
default: 'desc',
default: 'created_at',
description: 'The order the issues should be returned in.',
},
{
@ -816,7 +817,7 @@ export class Gitlab implements INodeType {
repository = this.getNodeParameter('repository', i) as string;
}
const baseEndpoint = `/projects/${owner}%2F${repository}`
const baseEndpoint = `/projects/${owner}%2F${repository}`;
if (resource === 'issue') {
if (operation === 'create') {

View file

@ -172,7 +172,7 @@ export class GitlabTrigger implements INodeType {
const events: { [key: string]: boolean } = { };
for (const e of eventsArray) {
events[`${e}_events`] = true
events[`${e}_events`] = true;
}
const endpoint = `/projects/${owner}%2F${repository}/hooks`;