mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Hide internal package versions (#20492)
* Hide internal versions from most searches. * Added test.
This commit is contained in:
		| @@ -122,8 +122,9 @@ func getVersionByNameAndVersion(ctx context.Context, ownerID int64, packageType | ||||
| // GetVersionsByPackageType gets all versions of a specific type | ||||
| func GetVersionsByPackageType(ctx context.Context, ownerID int64, packageType Type) ([]*PackageVersion, error) { | ||||
| 	pvs, _, err := SearchVersions(ctx, &PackageSearchOptions{ | ||||
| 		OwnerID: ownerID, | ||||
| 		Type:    packageType, | ||||
| 		OwnerID:    ownerID, | ||||
| 		Type:       packageType, | ||||
| 		IsInternal: util.OptionalBoolFalse, | ||||
| 	}) | ||||
| 	return pvs, err | ||||
| } | ||||
| @@ -137,6 +138,7 @@ func GetVersionsByPackageName(ctx context.Context, ownerID int64, packageType Ty | ||||
| 			ExactMatch: true, | ||||
| 			Value:      name, | ||||
| 		}, | ||||
| 		IsInternal: util.OptionalBoolFalse, | ||||
| 	}) | ||||
| 	return pvs, err | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user