GetUnmergedPullRequestsByBaseInfo returns all pull requests that are open and has not been merged by given base information (repo and branch).
(repoID int64, branch string)
| 545 | // GetUnmergedPullRequestsByBaseInfo returns all pull requests that are open and has not been merged |
| 546 | // by given base information (repo and branch). |
| 547 | func GetUnmergedPullRequestsByBaseInfo(repoID int64, branch string) ([]*PullRequest, error) { |
| 548 | prs := make([]*PullRequest, 0, 2) |
| 549 | return prs, x.Where("base_repo_id=? AND base_branch=? AND has_merged=? AND issue.is_closed=?", |
| 550 | repoID, branch, false, false). |
| 551 | Join("INNER", "issue", "issue.id=pull_request.issue_id").Find(&prs) |
| 552 | } |
| 553 | |
| 554 | var _ errutil.NotFound = (*ErrPullRequestNotExist)(nil) |
| 555 |
no test coverage detected