From 993a937238015bc04fe5fb1c2e4d29f2fd8f940d Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Mon, 6 May 2024 10:48:26 -0400 Subject: [PATCH] fix(dashboards): add active status on repo partial (#1119) --- api/dashboard/get.go | 1 + api/types/dashboard.go | 1 + 2 files changed, 2 insertions(+) diff --git a/api/dashboard/get.go b/api/dashboard/get.go index f36f92ee4..da4239667 100644 --- a/api/dashboard/get.go +++ b/api/dashboard/get.go @@ -98,6 +98,7 @@ func buildRepoPartials(c context.Context, repos []*types.DashboardRepo) ([]types repo.Org = dbRepo.GetOrg() repo.Name = dbRepo.GetName() repo.Counter = dbRepo.GetCounter() + repo.Active = dbRepo.GetActive() // list last 5 builds for repo given the branch and event filters builds, err := database.FromContext(c).ListBuildsForDashboardRepo(c, dbRepo, r.GetBranches(), r.GetEvents()) diff --git a/api/types/dashboard.go b/api/types/dashboard.go index 053942daf..11c3883ee 100644 --- a/api/types/dashboard.go +++ b/api/types/dashboard.go @@ -12,6 +12,7 @@ type RepoPartial struct { Org string `json:"org,omitempty"` Name string `json:"name,omitempty"` Counter int `json:"counter,omitempty"` + Active bool `json:"active,omitempty"` Builds []BuildPartial `json:"builds,omitempty"` }