Skip to content

Commit d12867f

Browse files
make sure models_gen.go is updated by real generation and not manually
1 parent 4f69077 commit d12867f

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

pkg/codefresh/argo_runtime.go

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ func newArgoRuntimeAPI(codefresh *codefresh) IArgoRuntimeAPI {
3636
}
3737

3838
func (r *argoRuntime) Create(runtimeName string) (*model.RuntimeCreationResponse, error) {
39-
interpolatedMutation := fmt.Sprintf(`mutation {
40-
runtime(name: "%s") {
41-
newAccessToken
42-
}
43-
}
44-
`, runtimeName)
45-
4639
jsonData := map[string]interface{}{
47-
"query": interpolatedMutation,
40+
"query": `mutation CreateRuntime($name: String!) {
41+
runtime(name: $name) {
42+
name
43+
newAccessToken
44+
}
45+
}`,
46+
"variables": map[string]string{
47+
"name": runtimeName,
48+
},
4849
}
4950

5051
response, err := r.codefresh.requestAPI(&requestOptions{
@@ -79,6 +80,10 @@ func (r *argoRuntime) Create(runtimeName string) (*model.RuntimeCreationResponse
7980
return &res.Data.Runtime, nil
8081
}
8182

83+
// func GetRuntimeName(runtimeName string) string {
84+
// return runtimeName
85+
// }
86+
8287
func (r *argoRuntime) List() ([]model.Runtime, error) {
8388
jsonData := map[string]interface{}{
8489
"query": `

pkg/codefresh/model/models_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)