Skip to content

Commit

Permalink
clean literal
Browse files Browse the repository at this point in the history
  • Loading branch information
reiji-h committed May 31, 2024
1 parent c857900 commit 5f75eaa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 5f75eaa

Please sign in to comment.