diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-26 11:13:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 10:13:51 +0100 |
commit | e673e42f7efafb184ffbe84f6998087713d8e373 (patch) | |
tree | 5169d41868c47c7f234693e5e41166316a5c5fab | |
parent | 622f1e764c6230023cc1944ad727cd2ad1544b68 (diff) | |
download | gitea-e673e42f7efafb184ffbe84f6998087713d8e373.tar.gz gitea-e673e42f7efafb184ffbe84f6998087713d8e373.zip |
Fixed issues not updated by commits (#16254)
`UpdateIssuesCommit` may get called with fewer commits because of `FeedMaxCommitNum` and therefore may miss some commands.
-rw-r--r-- | services/repository/push.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/repository/push.go b/services/repository/push.go index f031073b2e..dcb3bc779f 100644 --- a/services/repository/push.go +++ b/services/repository/push.go @@ -193,16 +193,17 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error { } commits = repo_module.ListToPushCommits(l) + + if err := repofiles.UpdateIssuesCommit(pusher, repo, commits.Commits, refName); err != nil { + log.Error("updateIssuesCommit: %v", err) + } + if len(commits.Commits) > setting.UI.FeedMaxCommitNum { commits.Commits = commits.Commits[:setting.UI.FeedMaxCommitNum] } commits.CompareURL = repo.ComposeCompareURL(opts.OldCommitID, opts.NewCommitID) notification.NotifyPushCommits(pusher, repo, opts, commits) - if err := repofiles.UpdateIssuesCommit(pusher, repo, commits.Commits, refName); err != nil { - log.Error("updateIssuesCommit: %v", err) - } - if err = models.RemoveDeletedBranch(repo.ID, branch); err != nil { log.Error("models.RemoveDeletedBranch %s/%s failed: %v", repo.ID, branch, err) } |