mirror of
https://github.com/go-gitea/gitea
synced 2025-08-26 03:18:28 +00:00
Always return the relevant status information, even if no status exists. (#35335)
This commit is contained in:
@@ -271,11 +271,7 @@ func GetCombinedCommitStatusByRef(ctx *context.APIContext) {
|
||||
}
|
||||
ctx.SetTotalCountHeader(count)
|
||||
|
||||
if len(statuses) == 0 {
|
||||
ctx.JSON(http.StatusOK, &api.CombinedStatus{})
|
||||
return
|
||||
}
|
||||
|
||||
combiStatus := convert.ToCombinedStatus(ctx, statuses, convert.ToRepo(ctx, repo, ctx.Repo.Permission))
|
||||
combiStatus := convert.ToCombinedStatus(ctx, refCommit.Commit.ID.String(), statuses,
|
||||
convert.ToRepo(ctx, repo, ctx.Repo.Permission))
|
||||
ctx.JSON(http.StatusOK, combiStatus)
|
||||
}
|
||||
|
Reference in New Issue
Block a user