From 5f75eaa2c118adea562eac09f41d80d47e871671 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 31 May 2024 08:18:58 +0000 Subject: [PATCH] clean literal --- .../src/features/growi-plugin/server/models/vo/github-url.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/features/growi-plugin/server/models/vo/github-url.ts b/apps/app/src/features/growi-plugin/server/models/vo/github-url.ts index 082a170815d..26b3c0968c9 100644 --- a/apps/app/src/features/growi-plugin/server/models/vo/github-url.ts +++ b/apps/app/src/features/growi-plugin/server/models/vo/github-url.ts @@ -39,8 +39,8 @@ export class GitHubUrl { get archiveUrl(): string { const encodedBranchName = encodeURIComponent(this.branchName); const encodedTagName = encodeURIComponent(this.tagName); - const zipUrl = encodedTagName !== '' ? `tags/${encodedTagName}.zip` : `heads/${encodedBranchName}.zip`; - const ghUrl = new URL(`/${this.organizationName}/${this.reposName}/archive/refs/${zipUrl}`, 'https://github.com'); + const zipUrl = encodedTagName !== '' ? `tags/${encodedTagName}` : `heads/${encodedBranchName}`; + const ghUrl = new URL(`/${this.organizationName}/${this.reposName}/archive/refs/${zipUrl}.zip`, 'https://github.com'); return ghUrl.toString(); }