1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-23 17:53:23 +02:00

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

closes #1427 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
}