Skip to content

Commit 4b31f54

Browse files
Use GITHUB_DOTCOM_URL so URL deduplication works
1 parent 28a5b95 commit 4b31f54

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

lib/util.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/util.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export function parseGithubUrl(inputUrl: string): string {
189189
// If we detect this is trying to be to github.com
190190
// then return with a fixed canonical URL.
191191
if (url.hostname === "github.com" || url.hostname === "api.github.com") {
192-
return "https://github.com/";
192+
return GITHUB_DOTCOM_URL;
193193
}
194194

195195
// Remove the API prefix if it's present
@@ -201,10 +201,5 @@ export function parseGithubUrl(inputUrl: string): string {
201201
url.hostname = url.hostname.substring(4);
202202
}
203203

204-
// Normalise path to having a trailing slash for consistency
205-
if (!url.pathname.endsWith("/")) {
206-
url.pathname = `${url.pathname}/`;
207-
}
208-
209204
return url.toString();
210205
}

0 commit comments

Comments
 (0)