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)
| 110 | // PullRequestURL returns URL for composing a pull request. |
| 111 | // This function does not check if the repository can actually compose a pull request. |
| 112 | func (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 |
| 121 | func RepoAssignment(pages ...bool) macaron.Handler { |
no test coverage detected