Skip to content

Commit 552e8d0

Browse files
committed
Add NotifySyncPushCommits to indexer notifier (#11309)
Thanks to @simon-on-gh for tracking down the issue. Fix #11200 Signed-off-by: Andrew Thornton <[email protected]>
1 parent f3a9005 commit 552e8d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/notification/indexer/indexer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ func (r *indexerNotifier) NotifyPushCommits(pusher *models.User, repo *models.Re
124124
}
125125
}
126126

127+
func (r *indexerNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
128+
if setting.Indexer.RepoIndexerEnabled && refName == git.BranchPrefix+repo.DefaultBranch {
129+
code_indexer.UpdateRepoIndexer(repo)
130+
}
131+
}
132+
127133
func (r *indexerNotifier) NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string) {
128134
issue_indexer.UpdateIssueIndexer(issue)
129135
}

0 commit comments

Comments
 (0)