refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)

This commit is contained in:
Michael Kret
2023-01-13 19:11:56 +02:00
committed by GitHub
parent d7732ea150
commit 6608e69457
254 changed files with 2687 additions and 2675 deletions

View File

@@ -34,7 +34,7 @@ export async function sentryIoApiRequest(
method,
qs,
body,
uri: uri || `https://sentry.io${resource}`,
uri: uri ?? `https://sentry.io${resource}`,
json: true,
};
if (!Object.keys(body).length) {
@@ -79,6 +79,26 @@ export async function sentryIoApiRequest(
}
}
function getNext(link: string) {
if (link === undefined) {
return;
}
const next = link.split(',')[1];
if (next.includes('rel="next"')) {
return next.split(';')[0].replace('<', '').replace('>', '').trim();
}
}
function hasMore(link: string) {
if (link === undefined) {
return;
}
const next = link.split(',')[1];
if (next.includes('rel="next"')) {
return next.includes('results="true"');
}
}
export async function sentryApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
method: string,
@@ -109,23 +129,3 @@ export async function sentryApiRequestAllItems(
return returnData;
}
function getNext(link: string) {
if (link === undefined) {
return;
}
const next = link.split(',')[1];
if (next.includes('rel="next"')) {
return next.split(';')[0].replace('<', '').replace('>', '').trim();
}
}
function hasMore(link: string) {
if (link === undefined) {
return;
}
const next = link.split(',')[1];
if (next.includes('rel="next"')) {
return next.includes('results="true"');
}
}