Skip to content

Commit 1340f8e

Browse files
committed
fix: support github urls with trailing slash
1 parent 25207d0 commit 1340f8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/features/githubUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export interface TokenValidationError {
5151
export const scrubRepositoryUrl = (address: string): string => {
5252
// Case-insensitive replace for github.com
5353
let scrubbedAddress = address.replace(/https?:\/\/github\.com\//i, "");
54+
if (scrubbedAddress.endsWith("/")) {
55+
scrubbedAddress = scrubbedAddress.slice(0, -1);
56+
}
5457
// Case-insensitive check and remove for .git extension
5558
if (scrubbedAddress.toLowerCase().endsWith(".git")) {
5659
scrubbedAddress = scrubbedAddress.slice(0, -4);

0 commit comments

Comments
 (0)