Skip to content

Commit 5ba3b4b

Browse files
committed
construct gerrit gitiles webUrl properly
1 parent ae69c00 commit 5ba3b4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/backend/src/repoCompileUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export const compileGerritConfig = async (
261261
// https://github.com/GerritCodeReview/plugins_gitiles/blob/5ee7f57/src/main/java/com/googlesource/gerrit/plugins/gitiles/GitilesWeblinks.java#L50
262262
if (webUrl.startsWith('/plugins/gitiles/')) {
263263
logger.debug(`WebUrl is a gitiles path, joining with hostUrl: ${webUrl}`);
264-
return path.join(hostUrl, webUrl);
264+
return new URL(path.join(hostUrl, webUrl)).toString();
265265
} else {
266266
logger.debug(`WebUrl is not a gitiles path, returning as is: ${webUrl}`);
267267
return webUrl;

0 commit comments

Comments
 (0)