diff --git a/packages/nodes-base/nodes/TravisCi/BuildDescription.ts b/packages/nodes-base/nodes/TravisCi/BuildDescription.ts index 7c6a18e7dc..0506dfdaf6 100644 --- a/packages/nodes-base/nodes/TravisCi/BuildDescription.ts +++ b/packages/nodes-base/nodes/TravisCi/BuildDescription.ts @@ -48,9 +48,9 @@ export const buildOperations = [ export const buildFields = [ -/* -------------------------------------------------------------------------- */ -/* build:cancel */ -/* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ + /* build:cancel */ + /* -------------------------------------------------------------------------- */ { displayName: 'Build ID', name: 'buildId', @@ -68,9 +68,10 @@ export const buildFields = [ default: '', description: 'Value uniquely identifying the build.', }, -/* -------------------------------------------------------------------------- */ -/* build:get */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* build:get */ + /* -------------------------------------------------------------------------- */ { displayName: 'Build ID', name: 'buildId', @@ -115,9 +116,10 @@ export const buildFields = [ }, ], }, -/* -------------------------------------------------------------------------- */ -/* build:getAll */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* build:getAll */ + /* -------------------------------------------------------------------------- */ { displayName: 'Return All', name: 'returnAll', @@ -235,9 +237,10 @@ export const buildFields = [ }, ], }, -/* -------------------------------------------------------------------------- */ -/* build:restart */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* build:restart */ + /* -------------------------------------------------------------------------- */ { displayName: 'Build ID', name: 'buildId', @@ -255,9 +258,10 @@ export const buildFields = [ default: '', description: 'Value uniquely identifying the build.', }, -/* -------------------------------------------------------------------------- */ -/* build:trigger */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* build:trigger */ + /* -------------------------------------------------------------------------- */ { displayName: 'Slug', name: 'slug', @@ -272,6 +276,7 @@ export const buildFields = [ ], }, }, + placeholder: 'n8n-io/n8n', default: '', description: 'Same as {ownerName}/{repositoryName}', }, diff --git a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts index 4e93ad159f..a7168039df 100644 --- a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts @@ -15,9 +15,9 @@ import { import { get, - } from 'lodash'; +} from 'lodash'; - import * as querystring from 'querystring'; +import * as querystring from 'querystring'; export async function travisciApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise { // tslint:disable-line:no-any const credentials = this.getCredentials('travisCiApi'); @@ -34,7 +34,7 @@ export async function travisciApiRequest(this: IHookFunctions | IExecuteFunction method, qs, body, - uri: uri ||`https://api.travis-ci.com${resource}`, + uri: uri || `https://api.travis-ci.com${resource}`, json: true }; options = Object.assign({}, options, option); @@ -58,7 +58,7 @@ export async function travisciApiRequest(this: IHookFunctions | IExecuteFunction * Make an API request to paginated TravisCI endpoint * and return all results */ -export async function travisciApiRequestAllItems(this: IHookFunctions | IExecuteFunctions| ILoadOptionsFunctions, propertyName: string, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any +export async function travisciApiRequestAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts index 3efabf165b..140a4cd0dc 100644 --- a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts +++ b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts @@ -23,14 +23,14 @@ export class TravisCi implements INodeType { description: INodeTypeDescription = { displayName: 'TravisCI', name: 'travisCi', - icon: 'file:travisCi.png', + icon: 'file:travisci.png', group: ['output'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Consume TravisCI API', defaults: { name: 'TravisCI', - color: '#FF0000', + color: '#666666', }, inputs: ['main'], outputs: ['main'], @@ -126,7 +126,7 @@ export class TravisCi implements INodeType { slug = slug.replace(new RegExp(/\//g), '%2F'); const request: IDataObject = { - branch, + branch, }; if (additionalFields.message) { @@ -137,7 +137,7 @@ export class TravisCi implements INodeType { request.merge_mode = additionalFields.mergeMode as string; } - responseData = await travisciApiRequest.call(this, 'POST', `/repo/${slug}/requests`, JSON.stringify({request})); + responseData = await travisciApiRequest.call(this, 'POST', `/repo/${slug}/requests`, JSON.stringify({ request })); } } if (Array.isArray(responseData)) { diff --git a/packages/nodes-base/nodes/TravisCi/travisCi.png b/packages/nodes-base/nodes/TravisCi/travisci.png similarity index 100% rename from packages/nodes-base/nodes/TravisCi/travisCi.png rename to packages/nodes-base/nodes/TravisCi/travisci.png