Encode branch names

This commit is contained in:
Caleb Owens 2024-07-25 16:26:58 +02:00
parent 064fdc04e3
commit 3a90776657

View File

@ -13,7 +13,7 @@
// Here we specifically want to prefer looking at the remote branch as
// the there may be multiple remotes that share the same local branch.
if (b.branch)
return `/${projectId}/branch/${branch?.remoteBranch?.name || branch?.localBranch?.name}`;
return `/${projectId}/branch/${encodeURIComponent(branch?.remoteBranch?.name || branch!.localBranch!.name)}`;
if (b.pr) return `/${projectId}/pull/${b.pr.number}`;
}