summaryrefslogtreecommitdiffstats
path: root/modules/repository/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/create.go')
-rw-r--r--modules/repository/create.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/repository/create.go b/modules/repository/create.go
index e8a1b8ba2b..10a1e872df 100644
--- a/modules/repository/create.go
+++ b/modules/repository/create.go
@@ -23,6 +23,7 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/git"
+ issue_indexer "code.gitea.io/gitea/modules/indexer/issues"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
@@ -418,6 +419,10 @@ func UpdateRepository(ctx context.Context, repo *repo_model.Repository, visibili
return fmt.Errorf("updateRepository[%d]: %w", forkRepos[i].ID, err)
}
}
+
+ // If visibility is changed, we need to update the issue indexer.
+ // Since the data in the issue indexer have field to indicate if the repo is public or not.
+ issue_indexer.UpdateRepoIndexer(ctx, repo.ID)
}
return nil