Skip to content

Commit 514dcd5

Browse files
with query the works from playground
1 parent 4efa7f7 commit 514dcd5

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

pkg/codefresh/git-source.go

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,27 @@ func newGitSourceAPI(codefresh *codefresh) IGitSourceAPI {
3939
}
4040

4141
func (g *gitSource) List(runtimeName string) ([]model.GitSource, error) {
42+
// jsonData := map[string]interface{}{
43+
// "query": `GetGitSourcesList(pagination: SlicePaginationArgs!, project: String!, $runtime: String!) {
44+
// gitSources(pagination: {}, project: "", runtime: $runtime) {
45+
// edges {
46+
// node {
47+
// metadata {
48+
// name
49+
// }
50+
// path
51+
// repoURL
52+
// }
53+
// }
54+
// }
55+
// }`,
56+
// "variables": map[string]interface{}{
57+
// "runtime": runtimeName,
58+
// },
59+
// }
60+
4261
jsonData := map[string]interface{}{
43-
"query": `GetGitSourcesList(pagination: SlicePaginationArgs!, project: String!, $runtime: String!) {
44-
gitSources(pagination: {}, project: "", runtime: $runtime) {
45-
edges {
46-
node {
47-
metadata {
48-
name
49-
}
50-
path
51-
repoURL
52-
}
53-
}
54-
}
55-
}`,
56-
"variables": map[string]interface{}{
57-
"runtime": runtimeName,
58-
},
62+
"query": `{\n gitSources(pagination: {}, project: \"\", runtime: \"gs-list-runtime-5\") {\n edges {\n node {\n metadata {\n name\n }\n path\n repoURL\n }\n }\n }\n}`,
5963
}
6064

6165
response, err := g.codefresh.requestAPI(&requestOptions{

0 commit comments

Comments
 (0)