Skip to content

Commit bb3c67d

Browse files
authored
Fix the problem that gitlab is incompatible with the .git suffix (#373)
1 parent 722b011 commit bb3c67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/[owner]/[repo]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ IMPORTANT:
13181318
}
13191319
else if (effectiveRepoInfo.type === 'gitlab') {
13201320
// GitLab API approach
1321-
const projectPath = extractUrlPath(effectiveRepoInfo.repoUrl ?? '') ?? `${owner}/${repo}`;
1321+
const projectPath = extractUrlPath(effectiveRepoInfo.repoUrl ?? '')?.replace(/\.git$/, '') || `${owner}/${repo}`;
13221322
const projectDomain = extractUrlDomain(effectiveRepoInfo.repoUrl ?? "https://gitlab.com");
13231323
const encodedProjectPath = encodeURIComponent(projectPath);
13241324

0 commit comments

Comments
 (0)