Skip to content

Commit 1d66ba5

Browse files
.
1 parent 400d9e1 commit 1d66ba5

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

pkg/codefresh/git-source.go

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,44 +37,31 @@ func newGitSourceAPI(codefresh *codefresh) IGitSourceAPI {
3737
}
3838

3939
func (g *gitSource) List(runtimeName string) ([]model.GitSource, error) {
40-
// jsonData := map[string]interface{}{
41-
// "query": `query GetGitSourcesList(pagination: SlicePaginationArgs!, project: String!, $runtime: String!) {
42-
// gitSources(pagination: {}, project: "", runtime: $runtime) {
43-
// edges {
44-
// node {
45-
// metadata {
46-
// name
47-
// }
48-
// path
49-
// repoURL
50-
// }
51-
// }
52-
// }
53-
// }`,
54-
// "variables": map[string]interface{}{
55-
// "runtime": runtimeName,
56-
// },
57-
// }
58-
5940
jsonData := map[string]interface{}{
60-
"query": `query ListGitSources($runtime: String, $pagination: SlicePaginationArgs) {
61-
gitSources(runtime: $runtime, pagination: $pagination) {
62-
edges {
63-
node {
64-
metadata {
65-
name
66-
}
67-
app {
68-
repoURL
69-
path
70-
}
41+
"query": `{
42+
gitSources {
43+
edges {
44+
node {
45+
metadata {
46+
name
47+
}
48+
self {
49+
path
50+
repoURL
51+
revision
52+
size
53+
status {
54+
syncStatus
55+
syncStartedAt
56+
syncFinishedAt
57+
healthStatus
58+
revision
7159
}
60+
}
61+
}
7262
}
7363
}
7464
}`,
75-
"variables": map[string]interface{}{
76-
"runtime": runtimeName,
77-
},
7865
}
7966

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

0 commit comments

Comments
 (0)