Skip to content

Commit a7d4ea6

Browse files
committed
fix(sonar): build agent session url with URL builder (typescript:S8786)
1 parent 828d80f commit a7d4ea6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/renderer/utils/forges/github/handlers/agentSessionThread.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,8 @@ export function getAgentSessionUrl(notification: GitifyNotification): Link {
7070
return repositoryUrl as Link;
7171
}
7272

73-
return `${repositoryUrl.replace(/\/+$/, '')}/agents` as Link;
73+
const url = new URL(repositoryUrl);
74+
url.pathname += '/agents';
75+
76+
return url.href as Link;
7477
}

0 commit comments

Comments
 (0)