aboutsummaryrefslogtreecommitdiffstats
path: root/services/packages
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-07-27 03:59:10 +0200
committerGitHub <noreply@github.com>2022-07-27 09:59:10 +0800
commita3d55ac52337ecc843a0ff353cde9e5a46b7f463 (patch)
tree206f1c14eaf3ddb73a75731bb4b6f8c75bad706e /services/packages
parent5ed082b62491f17c6c91e21f8fe7d544559b0ea1 (diff)
downloadgitea-a3d55ac52337ecc843a0ff353cde9e5a46b7f463.tar.gz
gitea-a3d55ac52337ecc843a0ff353cde9e5a46b7f463.zip
Hide internal package versions (#20492)
* Hide internal versions from most searches. * Added test.
Diffstat (limited to 'services/packages')
-rw-r--r--services/packages/packages.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/packages/packages.go b/services/packages/packages.go
index 0ebf6e7df0..aa1796e8b3 100644
--- a/services/packages/packages.go
+++ b/services/packages/packages.go
@@ -19,6 +19,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
packages_module "code.gitea.io/gitea/modules/packages"
+ "code.gitea.io/gitea/modules/util"
container_service "code.gitea.io/gitea/services/packages/container"
)
@@ -462,7 +463,8 @@ func RemoveAllPackages(ctx context.Context, userID int64) (int, error) {
PageSize: repo_model.RepositoryListDefaultPageSize,
Page: 1,
},
- OwnerID: userID,
+ OwnerID: userID,
+ IsInternal: util.OptionalBoolNone,
})
if err != nil {
return count, fmt.Errorf("GetOwnedPackages[%d]: %w", userID, err)