1
0
Fork 0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-04-26 05:24:45 +00:00

fix: return 404 on badge request for inactive repo ()

closes  with suggested edit.
This commit is contained in:
Hayden 2023-03-04 01:36:13 -09:00 committed by GitHub
parent 9d90b1ffb7
commit a2f226f7f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ import (
func GetBadge(c *gin.Context) {
_store := store.FromContext(c)
repo, err := _store.GetRepoName(c.Param("owner") + "/" + c.Param("name"))
if err != nil {
if err != nil || !repo.IsActive {
c.AbortWithStatus(404)
return
}