summaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go
index 243d40b1fa..d6bfbbf09f 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -436,7 +436,7 @@ func (pr *PullRequest) SetMerged() (bool, error) {
}
// NewPullRequest creates new pull request with labels for repository.
-func NewPullRequest(repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) {
+func NewPullRequest(outerCtx context.Context, repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) {
idx, err := db.GetNextResourceIndex("issue_index", repo.ID)
if err != nil {
return fmt.Errorf("generate pull request index failed: %v", err)
@@ -449,6 +449,7 @@ func NewPullRequest(repo *repo_model.Repository, issue *Issue, labelIDs []int64,
return err
}
defer committer.Close()
+ ctx.WithContext(outerCtx)
if err = newIssue(ctx, issue.Poster, NewIssueOptions{
Repo: repo,