Browse Source

table `pull_request` wasn't updated correctly (#2649)

* Fix: table `pull_request` won't be updated correctly

* Update also status column when manually merged
Kazuki Sawada 1 year ago
parent
commit
ffab139c91
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/pull.go

+ 1 - 1
models/pull.go

@@ -422,7 +422,7 @@ func (pr *PullRequest) setMerged() (err error) {
422 422
 	if err = pr.Issue.changeStatus(sess, pr.Merger, pr.Issue.Repo, true); err != nil {
423 423
 		return fmt.Errorf("Issue.changeStatus: %v", err)
424 424
 	}
425
-	if _, err = sess.ID(pr.ID).Cols("has_merged").Update(pr); err != nil {
425
+	if _, err = sess.ID(pr.ID).Cols("has_merged, status, merged_commit_id, merger_id, merged_unix").Update(pr); err != nil {
426 426
 		return fmt.Errorf("update pull request: %v", err)
427 427
 	}
428 428