1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Add is_archived option for issue indexer (#32735)

Try to fix #32697

Reason:
`is_archived` is already defined in the query options, but it is not
implemented in the indexer.
This commit is contained in:
yp05327
2024-12-12 08:33:31 +09:00
committed by GitHub
parent 39a01016cd
commit d43620e7bc
9 changed files with 62 additions and 11 deletions

View File

@@ -22,6 +22,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/indexer/code"
issue_indexer "code.gitea.io/gitea/modules/indexer/issues"
"code.gitea.io/gitea/modules/indexer/stats"
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/log"
@@ -905,6 +906,9 @@ func SettingsPost(ctx *context.Context) {
log.Error("CleanRepoScheduleTasks for archived repo %s/%s: %v", ctx.Repo.Owner.Name, repo.Name, err)
}
// update issue indexer
issue_indexer.UpdateRepoIndexer(ctx, repo.ID)
ctx.Flash.Success(ctx.Tr("repo.settings.archive.success"))
log.Trace("Repository was archived: %s/%s", ctx.Repo.Owner.Name, repo.Name)
@@ -929,6 +933,9 @@ func SettingsPost(ctx *context.Context) {
}
}
// update issue indexer
issue_indexer.UpdateRepoIndexer(ctx, repo.ID)
ctx.Flash.Success(ctx.Tr("repo.settings.unarchive.success"))
log.Trace("Repository was un-archived: %s/%s", ctx.Repo.Owner.Name, repo.Name)