summaryrefslogtreecommitdiffstats
path: root/services/forms/repo_form.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/forms/repo_form.go')
-rw-r--r--services/forms/repo_form.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go
index f40e99a044..5c3adc1cd3 100644
--- a/services/forms/repo_form.go
+++ b/services/forms/repo_form.go
@@ -6,6 +6,7 @@
package forms
import (
+ stdContext "context"
"net/http"
"net/url"
"strings"
@@ -601,7 +602,7 @@ func (f *MergePullRequestForm) Validate(req *http.Request, errs binding.Errors)
}
// SetDefaults if not provided for mergestyle and commit message
-func (f *MergePullRequestForm) SetDefaults(pr *models.PullRequest) (err error) {
+func (f *MergePullRequestForm) SetDefaults(ctx stdContext.Context, pr *models.PullRequest) (err error) {
if f.Do == "" {
f.Do = "merge"
}
@@ -610,9 +611,9 @@ func (f *MergePullRequestForm) SetDefaults(pr *models.PullRequest) (err error) {
if len(f.MergeTitleField) == 0 {
switch f.Do {
case "merge", "rebase-merge":
- f.MergeTitleField, err = pr.GetDefaultMergeMessage()
+ f.MergeTitleField, err = pr.GetDefaultMergeMessage(ctx)
case "squash":
- f.MergeTitleField, err = pr.GetDefaultSquashMessage()
+ f.MergeTitleField, err = pr.GetDefaultSquashMessage(ctx)
}
}