The parameters are not correctly encoded. The link to the branch appears to be also wrong, we should not need/have the p
parameter.
TuleapLink repoLink = ((Actionable) owner).getAction(TuleapLink.class);
if (repoLink != null) {
if(head instanceof TuleapBranchSCMHead) {
String canonicalRepoName = repositoryPath.replace(project.getShortname() + "/", "");
String url = repoLink.getUrl() + "?p=" + canonicalRepoName + "&a=shortlog&h=" + head.getName();
result.add(new TuleapLink("icon-git-branch", url));
} else if (head instanceof TuleapPullRequestSCMHead){
TuleapPullRequestSCMHead tuleapPullRequestSCMHead = (TuleapPullRequestSCMHead) head;
String prUrl = this.getGitBaseUri()+"?action=pull-requests&repo_id="+this.repository.getId()+"&group_id="+this.projectId+"#/pull-requests/"+tuleapPullRequestSCMHead.getId()+"/overview";
result.add(new TuleapLink("icon-git-branch", prUrl));
}
}