From b6af657295e68388fa31643ac6819e014170d2d5 Mon Sep 17 00:00:00 2001 From: Blake Pettersson Date: Wed, 11 Dec 2024 01:17:21 -1000 Subject: [PATCH] fix: add missing fields in listrepositories (#20991) (#21129) This fixes a regression in 2.12. Before 2.12 githubAppInstallationID, `githubAppID` and `gitHubAppEnterpriseBaseURL` were returned, but with 2.12 the repo is retrieved with getRepositories`, which does not include those fields. To fix this, add those missing fields to `ListRepositories`. Signed-off-by: Blake Pettersson --- server/repository/repository.go | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/server/repository/repository.go b/server/repository/repository.go index 2e25f87ce19d1..15a7383331a7b 100644 --- a/server/repository/repository.go +++ b/server/repository/repository.go @@ -188,18 +188,21 @@ func (s *Server) ListRepositories(ctx context.Context, q *repositorypkg.RepoQuer } // remove secrets items = append(items, &appsv1.Repository{ - Repo: repo.Repo, - Type: rType, - Name: repo.Name, - Username: repo.Username, - Insecure: repo.IsInsecure(), - EnableLFS: repo.EnableLFS, - EnableOCI: repo.EnableOCI, - Proxy: repo.Proxy, - NoProxy: repo.NoProxy, - Project: repo.Project, - ForceHttpBasicAuth: repo.ForceHttpBasicAuth, - InheritedCreds: repo.InheritedCreds, + Repo: repo.Repo, + Type: rType, + Name: repo.Name, + Username: repo.Username, + Insecure: repo.IsInsecure(), + EnableLFS: repo.EnableLFS, + EnableOCI: repo.EnableOCI, + Proxy: repo.Proxy, + NoProxy: repo.NoProxy, + Project: repo.Project, + ForceHttpBasicAuth: repo.ForceHttpBasicAuth, + InheritedCreds: repo.InheritedCreds, + GithubAppId: repo.GithubAppId, + GithubAppInstallationId: repo.GithubAppInstallationId, + GitHubAppEnterpriseBaseURL: repo.GitHubAppEnterpriseBaseURL, }) } }