Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/pr/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func main() {
//Use git cli command for windows
runCmd("git", "fetch", remoteUpstream, fmt.Sprintf("pull/%s/head:%s", pr, branch))
} else {
ref := fmt.Sprintf(gitea_git.PullPrefix+"%s/head:%s", pr, branchRef)
ref := fmt.Sprintf("%s%s/head:%s", gitea_git.PullPrefix, pr, branchRef)
err = repo.Fetch(&git.FetchOptions{
RemoteName: remoteUpstream,
RefSpecs: []config.RefSpec{
Expand Down
2 changes: 1 addition & 1 deletion models/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (pr *PullRequest) GetDefaultSquashMessage() string {

// GetGitRefName returns git ref for hidden pull request branch
func (pr *PullRequest) GetGitRefName() string {
return fmt.Sprintf(git.PullPrefix+"%d/head", pr.Index)
return fmt.Sprintf("%s%d/head", git.PullPrefix, pr.Index)
}

// IsChecking returns true if this pull request is still checking conflict.
Expand Down
2 changes: 1 addition & 1 deletion modules/convert/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
Expand Down
2 changes: 1 addition & 1 deletion modules/migration/pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down