MCPcopy Create free account
hub / github.com/gogs/gogs / PullRequestURL

Method PullRequestURL

internal/context/repo.go:112–118  ·  view source on GitHub ↗

PullRequestURL returns URL for composing a pull request. This function does not check if the repository can actually compose a pull request.

(baseBranch, headBranch string)

Source from the content-addressed store, hash-verified

110// PullRequestURL returns URL for composing a pull request.
111// This function does not check if the repository can actually compose a pull request.
112func (r *Repository) PullRequestURL(baseBranch, headBranch string) string {
113 repoLink := r.RepoLink
114 if r.PullRequest.BaseRepo != nil {
115 repoLink = r.PullRequest.BaseRepo.Link()
116 }
117 return fmt.Sprintf("%s/compare/%s...%s:%s", repoLink, baseBranch, r.Owner.Name, headBranch)
118}
119
120// [0]: issues, [1]: wiki
121func RepoAssignment(pages ...bool) macaron.Handler {

Callers 3

editFilePostFunction · 0.80
DeleteFilePostFunction · 0.80
UploadFilePostFunction · 0.80

Implementers 2

Repositoryinternal/database/repo.go
mailerRepointernal/database/issue_mail.go

Calls 1

LinkMethod · 0.45

Tested by

no test coverage detected