Use fmt.Sprintf correctly (#17886)
This commit is contained in:
parent
fbf3208229
commit
4646c7c52d
4 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ func ToAPIPullRequest(pr *models.PullRequest, doer *user_model.User) *api.PullRe
|
|||
},
|
||||
Head: &api.PRBranchInfo{
|
||||
Name: pr.HeadBranch,
|
||||
Ref: fmt.Sprintf(git.PullPrefix+"%d/head", pr.Index),
|
||||
Ref: fmt.Sprintf("%s%d/head", git.PullPrefix, pr.Index),
|
||||
RepoID: -1,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ func (p *PullRequest) IsForkPullRequest() bool {
|
|||
|
||||
// GetGitRefName returns pull request relative path to head
|
||||
func (p PullRequest) GetGitRefName() string {
|
||||
return fmt.Sprintf(git.PullPrefix+"%d/head", p.Number)
|
||||
return fmt.Sprintf("%s%d/head", git.PullPrefix, p.Number)
|
||||
}
|
||||
|
||||
// PullRequestBranch represents a pull request branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue