From 5fd94d51cc3cb02ab908b81f6801a8e9c733c1dd Mon Sep 17 00:00:00 2001 From: Adithya Viswanathan Date: Mon, 11 Mar 2024 13:12:23 +0530 Subject: [PATCH 1/4] [feat]: [CDS-93606]: Fix the query param for github list repos --- scm/driver/github/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm/driver/github/util.go b/scm/driver/github/util.go index d06e474e..20fcc138 100644 --- a/scm/driver/github/util.go +++ b/scm/driver/github/util.go @@ -29,7 +29,7 @@ func encodeRepoListOptions(opts scm.RepoListOptions) string { if opts.RepoSearchTerm.RepoName != "" { sb.WriteString("q=") sb.WriteString(opts.RepoSearchTerm.RepoName) - sb.WriteString("in:name+user:") + sb.WriteString(" in:name+user:") sb.WriteString(opts.RepoSearchTerm.User) } else { sb.WriteString("q=") From d661977134fbebc4d30f5bd05181c8b1bcc4c128 Mon Sep 17 00:00:00 2001 From: Adithya Viswanathan Date: Mon, 11 Mar 2024 13:18:07 +0530 Subject: [PATCH 2/4] [feat]: [CDS-93606]: Fix the query param for github list repos --- scm/driver/github/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm/driver/github/util.go b/scm/driver/github/util.go index 20fcc138..d06e474e 100644 --- a/scm/driver/github/util.go +++ b/scm/driver/github/util.go @@ -29,7 +29,7 @@ func encodeRepoListOptions(opts scm.RepoListOptions) string { if opts.RepoSearchTerm.RepoName != "" { sb.WriteString("q=") sb.WriteString(opts.RepoSearchTerm.RepoName) - sb.WriteString(" in:name+user:") + sb.WriteString("in:name+user:") sb.WriteString(opts.RepoSearchTerm.User) } else { sb.WriteString("q=") From d830625005fc78f6c92c468492d9c686a00ebd6b Mon Sep 17 00:00:00 2001 From: Adithya Viswanathan Date: Mon, 11 Mar 2024 15:45:10 +0530 Subject: [PATCH 3/4] [feat]: [CDS-93606]: Fix the query param for github list repos --- scm/driver/github/repo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/scm/driver/github/repo.go b/scm/driver/github/repo.go index c9f09b7b..a2dc03a9 100644 --- a/scm/driver/github/repo.go +++ b/scm/driver/github/repo.go @@ -117,6 +117,7 @@ func (s *RepositoryService) List(ctx context.Context, opts scm.ListOptions) ([]* // ListV2 returns the user repository list based on the searchTerm passed. func (s *RepositoryService) ListV2(ctx context.Context, opts scm.RepoListOptions) ([]*scm.Repository, *scm.Response, error) { path := fmt.Sprintf("search/repositories?%s", encodeRepoListOptions(opts)) + fmt.Println(path) out := new(searchRepositoryList) res, err := s.client.do(ctx, "GET", path, nil, &out) return convertRepositoryList(out.Repositories), res, err From af8e8af5589997f6aa1bb8d066e3731c65497e70 Mon Sep 17 00:00:00 2001 From: Adithya Viswanathan Date: Mon, 11 Mar 2024 20:11:09 +0530 Subject: [PATCH 4/4] [feat]: [CDS-93606]: Fix the query param for github list repos --- scm/driver/github/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm/driver/github/util.go b/scm/driver/github/util.go index d06e474e..20fcc138 100644 --- a/scm/driver/github/util.go +++ b/scm/driver/github/util.go @@ -29,7 +29,7 @@ func encodeRepoListOptions(opts scm.RepoListOptions) string { if opts.RepoSearchTerm.RepoName != "" { sb.WriteString("q=") sb.WriteString(opts.RepoSearchTerm.RepoName) - sb.WriteString("in:name+user:") + sb.WriteString(" in:name+user:") sb.WriteString(opts.RepoSearchTerm.User) } else { sb.WriteString("q=")