1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

Fix package error handling and npm meta and empty repo guide (#33112)

This commit is contained in:
wxiaoguang
2025-01-06 14:17:28 +08:00
committed by GitHub
parent e637008fe3
commit 0fad40dd8c
10 changed files with 69 additions and 49 deletions

View File

@@ -250,6 +250,7 @@ func handleRepoEmptyOrBroken(ctx *context.Context) {
showEmpty = true // it is not really empty, but there is no branch
// at the moment, other repo units like "actions" are not able to handle such case,
// so we just mark the repo as empty to prevent from displaying these units.
ctx.Data["RepoHasContentsWithoutBranch"] = true
updateContextRepoEmptyAndStatus(ctx, true, repo_model.RepositoryReady)
} else {
// the repo is actually not empty and has branches, need to update the database later