This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch fix#5640-3
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/fix#5640-3 by this push:
new 00d58dd5f fix: bitbucket search-remote-scopes
00d58dd5f is described below
commit 00d58dd5f2227dfeae5b454bc926df5f23a69b7c
Author: abeizn <[email protected]>
AuthorDate: Tue Sep 19 20:34:54 2023 +0800
fix: bitbucket search-remote-scopes
---
backend/plugins/bitbucket/api/remote.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/plugins/bitbucket/api/remote.go
b/backend/plugins/bitbucket/api/remote.go
index e7ba51daf..a5dd2d422 100644
--- a/backend/plugins/bitbucket/api/remote.go
+++ b/backend/plugins/bitbucket/api/remote.go
@@ -128,7 +128,7 @@ func SearchRemoteScopes(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutp
s := queryData.Search[0]
query.Set("sort", "name")
query.Set("fields",
"values.name,values.full_name,values.language,values.description,values.owner.display_name,values.created_on,values.updated_on,values.links.clone,values.links.html,pagelen,page,size")
- gid, searchName := GetSearch(s)
+ gid, searchName := getSearch(s)
query.Set("q", fmt.Sprintf(`name~"%s"`, searchName))
// list repos part
@@ -148,7 +148,7 @@ func SearchRemoteScopes(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutp
)
}
-func GetSearch(s string) (string, string) {
+func getSearch(s string) (string, string) {
gid := ""
if strings.Contains(s, "/") {
parts := strings.Split(s, "/")