mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Minor formatting improvements
This commit is contained in:
@@ -19,7 +19,7 @@ import { OptionsWithUri } from 'request';
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
export async function gitlabApiRequest(this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, body: object, query?: object, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
export async function gitlabApiRequest(this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, body: object, query?: object, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||||
const options : OptionsWithUri = {
|
const options: OptionsWithUri = {
|
||||||
method,
|
method,
|
||||||
headers: {},
|
headers: {},
|
||||||
body,
|
body,
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export class GitlabTrigger implements INodeType {
|
|||||||
const owner = this.getNodeParameter('owner') as string;
|
const owner = this.getNodeParameter('owner') as string;
|
||||||
const repository = this.getNodeParameter('repository') as string;
|
const repository = this.getNodeParameter('repository') as string;
|
||||||
|
|
||||||
const path = (`${owner}/${repository}`).replace(/\//g,'%2F');
|
const path = (`${owner}/${repository}`).replace(/\//g, '%2F');
|
||||||
|
|
||||||
const endpoint = `/projects/${path}/hooks/${webhookData.webhookId}`;
|
const endpoint = `/projects/${path}/hooks/${webhookData.webhookId}`;
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ export class GitlabTrigger implements INodeType {
|
|||||||
eventsArray = ['note', 'issues', 'job', 'merge_requests', 'pipeline', 'push', 'tag_push', 'wiki_page'];
|
eventsArray = ['note', 'issues', 'job', 'merge_requests', 'pipeline', 'push', 'tag_push', 'wiki_page'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const events: { [key: string]: boolean } = { };
|
const events: { [key: string]: boolean } = {};
|
||||||
for (const e of eventsArray) {
|
for (const e of eventsArray) {
|
||||||
events[`${e}_events`] = true;
|
events[`${e}_events`] = true;
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ export class GitlabTrigger implements INodeType {
|
|||||||
events['push_events'] = false;
|
events['push_events'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const path = (`${owner}/${repository}`).replace(/\//g,'%2F');
|
const path = (`${owner}/${repository}`).replace(/\//g, '%2F');
|
||||||
|
|
||||||
const endpoint = `/projects/${path}/hooks`;
|
const endpoint = `/projects/${path}/hooks`;
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ export class GitlabTrigger implements INodeType {
|
|||||||
const owner = this.getNodeParameter('owner') as string;
|
const owner = this.getNodeParameter('owner') as string;
|
||||||
const repository = this.getNodeParameter('repository') as string;
|
const repository = this.getNodeParameter('repository') as string;
|
||||||
|
|
||||||
const path = (`${owner}/${repository}`).replace(/\//g,'%2F');
|
const path = (`${owner}/${repository}`).replace(/\//g, '%2F');
|
||||||
|
|
||||||
const endpoint = `/projects/${path}/hooks/${webhookData.webhookId}`;
|
const endpoint = `/projects/${path}/hooks/${webhookData.webhookId}`;
|
||||||
const body = {};
|
const body = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user