summaryrefslogtreecommitdiffstats
path: root/models/pull_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/pull_list.go')
-rw-r--r--models/pull_list.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/pull_list.go b/models/pull_list.go
index 055119a1e5..ca09e28a93 100644
--- a/models/pull_list.go
+++ b/models/pull_list.go
@@ -62,8 +62,8 @@ func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequ
// HasUnmergedPullRequestsByHeadInfo checks if there are open and not merged pull request
// by given head information (repo and branch)
-func HasUnmergedPullRequestsByHeadInfo(repoID int64, branch string) (bool, error) {
- return db.GetEngine(db.DefaultContext).
+func HasUnmergedPullRequestsByHeadInfo(ctx context.Context, repoID int64, branch string) (bool, error) {
+ return db.GetEngine(ctx).
Where("head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?",
repoID, branch, false, false, PullRequestFlowGithub).
Join("INNER", "issue", "issue.id = pull_request.issue_id").