From 4140d92a68bce9d4c325407cc7b66ebdffd5c357 Mon Sep 17 00:00:00 2001 From: DE BAERDEMAEKER Mathieu Date: Fri, 26 Feb 2021 11:24:46 +0100 Subject: [PATCH] fix(console): remove all log --- rollup.config.js | 6 ++++-- src/requesters/OAuthAzureDevOps.requester.ts | 6 ------ src/requesters/OAuthGithub.requester.ts | 2 +- src/requesters/Requester.ts | 2 +- src/services/OAuthGithub.service.ts | 4 ---- src/shared/token.ts | 1 + src/utils.ts | 2 -- 7 files changed, 7 insertions(+), 16 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index f63c84b..f8b9cac 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -25,12 +25,14 @@ export default { nodePolyfills(), svelte({ compilerOptions: { - // enable run-time checks when not in production dev: !production, }, preprocess: createPreprocessors(!production), }), - css({ output: 'bundle.css' }), + css({ + output: 'bundle.css', + sourceMap: !production, + }), resolve({ browser: true, dedupe: ['svelte'], diff --git a/src/requesters/OAuthAzureDevOps.requester.ts b/src/requesters/OAuthAzureDevOps.requester.ts index 1e08b37..a3fb293 100644 --- a/src/requesters/OAuthAzureDevOps.requester.ts +++ b/src/requesters/OAuthAzureDevOps.requester.ts @@ -41,9 +41,6 @@ export class OAuthAzureDevOpsRequester extends Requester( `https://vssps.dev.azure.com/_apis/graph/descriptors/${userId}?api-version=${this.API_VERSION}`, - { - cache: true, - }, ) ).value; } @@ -55,9 +52,6 @@ export class OAuthAzureDevOpsRequester extends Requester( `https://vssps.dev.azure.com/${organizationName}/_apis/graph/Subjects/${descriptor}/avatars?size=large&api-version=${this.API_VERSION}`, - { - cache: true, - }, ) ).value; } diff --git a/src/requesters/OAuthGithub.requester.ts b/src/requesters/OAuthGithub.requester.ts index 74bf6d7..efa047d 100644 --- a/src/requesters/OAuthGithub.requester.ts +++ b/src/requesters/OAuthGithub.requester.ts @@ -74,7 +74,7 @@ export class OAuthGithubRequester extends Requester { pullRequest?: string, ): Promise { return super.fetch( - `https://api.github.com/repos/${owner}/${repository}/issues/${pullRequest}/comments?sort=updated`, + `https://api.github.com/repos/${owner}/${repository}/pulls/${pullRequest}/comments?sort=updated`, ); } diff --git a/src/requesters/Requester.ts b/src/requesters/Requester.ts index 8738ba9..d947b5b 100644 --- a/src/requesters/Requester.ts +++ b/src/requesters/Requester.ts @@ -52,7 +52,7 @@ export abstract class Requester { }, ], }, - cache: options && options.cache ? 'force-cache' : 'no-store', + cache: 'force-cache', headers, }); diff --git a/src/services/OAuthGithub.service.ts b/src/services/OAuthGithub.service.ts index aa9ac71..934d1a2 100644 --- a/src/services/OAuthGithub.service.ts +++ b/src/services/OAuthGithub.service.ts @@ -83,10 +83,6 @@ export class OAuthGithubService implements IService { pullRequest.number.toString(), ); - comments = comments.filter( - comment => comment.user.type === GithubUserEnum.User, - ); - let reviewers = await this.requester.getReviews( owner, name, diff --git a/src/shared/token.ts b/src/shared/token.ts index cad483e..ca20634 100644 --- a/src/shared/token.ts +++ b/src/shared/token.ts @@ -32,6 +32,7 @@ export const getToken = async ( [provider]: { ...n[provider], ...result, + current_date: new Date(), }, })); } diff --git a/src/utils.ts b/src/utils.ts index f374606..11d093a 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -6,8 +6,6 @@ export const checkRepository = async ( { target }, repository: RepositoryType, ) => { - console.log({ repository }); - const { checked } = target as HTMLInputElement; if (checked) {