From 854e0cfa3bfedea783def92395a3604bbcac89e9 Mon Sep 17 00:00:00 2001 From: Ritesh Noronha Date: Sat, 8 Feb 2025 14:18:35 -0800 Subject: [PATCH] Limit repo to provided one --- pkg/source/github/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/source/github/client.go b/pkg/source/github/client.go index 469d756..0926b7b 100644 --- a/pkg/source/github/client.go +++ b/pkg/source/github/client.go @@ -422,6 +422,10 @@ func (c *Client) updateRepo(repo string) { func (c *Client) GetAllRepositories(ctx *tcontext.TransferMetadata) ([]string, error) { logger.LogDebug(ctx.Context, "Fetching all repositories for an organization", "name", c.Owner) + if c.Repo != "" { + return []string{c.Repo}, nil + } + apiURL := fmt.Sprintf("https://api.github.com/orgs/%s/repos", c.Owner) logger.LogDebug(ctx.Context, "Constructed API URL for repositories", "value", apiURL)