mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Update status and code index after changing the default branch (#27018)
Fix #26723 Add `ChangeDefaultBranch` to the `notifier` interface and implement it in `indexerNotifier`. So when changing the default branch, `indexerNotifier` sends a message to the `indexer queue` to update the index. --------- Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
@ -360,3 +360,10 @@ func PackageDelete(ctx context.Context, doer *user_model.User, pd *packages_mode
|
||||
notifier.PackageDelete(ctx, doer, pd)
|
||||
}
|
||||
}
|
||||
|
||||
// ChangeDefaultBranch notifies change default branch to notifiers
|
||||
func ChangeDefaultBranch(ctx context.Context, repo *repo_model.Repository) {
|
||||
for _, notifier := range notifiers {
|
||||
notifier.ChangeDefaultBranch(ctx, repo)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user