From 538d34510d74a60e96fce88bfb65e8e41e4d8325 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Sun, 21 Mar 2021 07:19:15 -0400 Subject: [PATCH] :zap: Add query parameter to operation issue:getAll (Sentry.io) (#1560) --- .../nodes/SentryIo/GenericFunctions.ts | 12 ++++++------ .../nodes/SentryIo/IssueDescription.ts | 7 +++++++ .../nodes-base/nodes/SentryIo/SentryIo.node.ts | 4 ++-- packages/nodes-base/nodes/SentryIo/sentryio.png | Bin 1305 -> 0 bytes packages/nodes-base/nodes/SentryIo/sentryio.svg | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) delete mode 100644 packages/nodes-base/nodes/SentryIo/sentryio.png create mode 100644 packages/nodes-base/nodes/SentryIo/sentryio.svg diff --git a/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts b/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts index f318c44ba2..326c49d471 100644 --- a/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts @@ -1,6 +1,6 @@ import { OptionsWithUri - } from 'request'; +} from 'request'; import { IExecuteFunctions, @@ -24,7 +24,7 @@ export async function sentryIoApiRequest(this: IHookFunctions | IExecuteFunction method, qs, body, - uri: uri ||`https://sentry.io${resource}`, + uri: uri || `https://sentry.io${resource}`, json: true, }; if (!Object.keys(body).length) { @@ -73,7 +73,7 @@ export async function sentryIoApiRequest(this: IHookFunctions | IExecuteFunction } } -export async function sentryApiRequestAllItems(this: IHookFunctions | IExecuteFunctions| ILoadOptionsFunctions, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any +export async function sentryApiRequestAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any const returnData: IDataObject[] = []; @@ -99,17 +99,17 @@ export async function sentryApiRequestAllItems(this: IHookFunctions | IExecuteFu } function getNext(link: string) { - if (link === undefined) { + if (link === undefined) { return; } const next = link.split(',')[1]; if (next.includes('rel="next"')) { - return next.split(';')[0].replace('<', '').replace('>','').trim(); + return next.split(';')[0].replace('<', '').replace('>', '').trim(); } } function hasMore(link: string) { - if (link === undefined) { + if (link === undefined) { return; } const next = link.split(',')[1]; diff --git a/packages/nodes-base/nodes/SentryIo/IssueDescription.ts b/packages/nodes-base/nodes/SentryIo/IssueDescription.ts index 37d9abbe7e..8ac624f7d3 100644 --- a/packages/nodes-base/nodes/SentryIo/IssueDescription.ts +++ b/packages/nodes-base/nodes/SentryIo/IssueDescription.ts @@ -171,6 +171,13 @@ export const issueFields = [ }, }, options: [ + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'An optional Sentry structured search query. If not provided an implied "is:unresolved" is assumed. Info here.', + }, { displayName: 'Stats Period', name: 'statsPeriod', diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index 0e02a28522..f545683416 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -56,14 +56,14 @@ export class SentryIo implements INodeType { description: INodeTypeDescription = { displayName: 'Sentry.io', name: 'sentryIo', - icon: 'file:sentryio.png', + icon: 'file:sentryio.svg', group: ['output'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Consume Sentry.io API', defaults: { name: 'Sentry.io', - color: '#000000', + color: '#362d59', }, inputs: ['main'], outputs: ['main'], diff --git a/packages/nodes-base/nodes/SentryIo/sentryio.png b/packages/nodes-base/nodes/SentryIo/sentryio.png deleted file mode 100644 index a44ffc3ccd7bb8cfda8b82cc69576bf99541224a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmb`H{Xf$Q0LQ<1C}h$k53?yM_A)nRNXpsbYTAjVO?k+rhCJMau<~$1ILp&K46$ov zp?MAq5z$6j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VTYBT_W_@Lk9eOf~@#t2q+@u8TVzUs&XB56qSN>$kIrWB4?~h_nYV4>Qj{zt?H7n%%axjcNfEkPQPl=( zOd5{%tq#jG>4Q10RcyA5ZBhy-P7q&XyY{wcV>1Km#|-x-Bx;ZEnmE)UoMNEk+I61U xC_XV8C{21GA+7V4g;y8!_!#J&)*?(U{SXs4khKaB+_pXrz`D3O*JAvW{{!0Gp#T5? diff --git a/packages/nodes-base/nodes/SentryIo/sentryio.svg b/packages/nodes-base/nodes/SentryIo/sentryio.svg new file mode 100644 index 0000000000..11d971474b --- /dev/null +++ b/packages/nodes-base/nodes/SentryIo/sentryio.svg @@ -0,0 +1 @@ + \ No newline at end of file