diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go index ac9c9cc76d..8d16e34dad 100644 --- a/services/mirror/mirror_pull.go +++ b/services/mirror/mirror_pull.go @@ -500,6 +500,13 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool { theCommits.Commits = theCommits.Commits[:setting.UI.FeedMaxCommitNum] } + if newCommit, err := gitRepo.GetCommit(newCommitID); err != nil { + log.Error("SyncMirrors [repo: %-v]: unable to get commit %s: %v", m.Repo, newCommitID, err) + continue + } else { + theCommits.HeadCommit = repo_module.CommitToPushCommit(newCommit) + } + theCommits.CompareURL = m.Repo.ComposeCompareURL(oldCommitID, newCommitID) notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{