•  
      request #33647 Link to repo/PR is incorrectly encoded
    Infos
    #33647
    Thomas Gerbet (tgerbet)
    2023-08-08 12:04
    2023-08-01 10:51
    35268
    Details
    Link to repo/PR is incorrectly encoded

    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));
                    }
                }
    
    Jenkins Branch Source plugin
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Clarck Robinson (robinsoc)
    Closed
    2023-08-08
    Attachments
    Empty
    References
    References list is empty

    Follow-ups