aboutsummaryrefslogtreecommitdiffstats
path: root/modules/notification/indexer
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2020-01-24 15:00:49 -0300
committerLauris BH <lauris@nix.lv>2020-01-24 20:00:49 +0200
commitdbd1fae6187ba60f31972d656c8de0bfd1ca074c (patch)
tree59683e3a67dea58d6df791c421cbffe4023d3b98 /modules/notification/indexer
parent514be723b2841de4cad4d1a4f4c516e1befe6b67 (diff)
downloadgitea-dbd1fae6187ba60f31972d656c8de0bfd1ca074c.tar.gz
gitea-dbd1fae6187ba60f31972d656c8de0bfd1ca074c.zip
Fix repo indexer not updating upon push (#9957)
* Fix check for push on default branch * restart CI Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/notification/indexer')
-rw-r--r--modules/notification/indexer/indexer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/notification/indexer/indexer.go b/modules/notification/indexer/indexer.go
index e87f522061..4bce990739 100644
--- a/modules/notification/indexer/indexer.go
+++ b/modules/notification/indexer/indexer.go
@@ -6,6 +6,7 @@ package indexer
import (
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/modules/git"
code_indexer "code.gitea.io/gitea/modules/indexer/code"
issue_indexer "code.gitea.io/gitea/modules/indexer/issues"
"code.gitea.io/gitea/modules/log"
@@ -119,7 +120,7 @@ func (r *indexerNotifier) NotifyMigrateRepository(doer *models.User, u *models.U
}
func (r *indexerNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {
- if setting.Indexer.RepoIndexerEnabled && refName == repo.DefaultBranch {
+ if setting.Indexer.RepoIndexerEnabled && refName == git.BranchPrefix+repo.DefaultBranch {
code_indexer.UpdateRepoIndexer(repo)
}
}