Skip to content

Commit 27c559d

Browse files
wip
1 parent 919a9ac commit 27c559d

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

pkg/codefresh/model/models_gen.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/codefresh/workflow_v2.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
type (
1111
IWorkflowV2API interface {
12-
Get(ctx context.Context, name, namespace, runtime string) (*model.Workflow, error)
12+
Get(ctx context.Context, uid string) (*model.Workflow, error)
1313
List(ctx context.Context, filterArgs model.WorkflowsFilterArgs) ([]model.Workflow, error)
1414
}
1515

@@ -36,16 +36,15 @@ func newWorkflowV2API(codefresh *codefresh) IWorkflowV2API {
3636
return &workflowV2{codefresh: codefresh}
3737
}
3838

39-
func (w *workflowV2) Get(ctx context.Context, name, namespace, runtime string) (*model.Workflow, error) {
39+
func (w *workflowV2) Get(ctx context.Context, uid string) (*model.Workflow, error) {
4040
jsonData := map[string]interface{}{
4141
"query": `
4242
query Workflow(
43-
$runtime: String!
44-
$name: String!
45-
$namespace: String
43+
$uid: String!
4644
) {
47-
workflow(name: $name, namespace: $namespace, runtime: $runtime) {
45+
workflow(uid: $uid) {
4846
metadata {
47+
uid
4948
name
5049
namespace
5150
runtime
@@ -81,9 +80,7 @@ func (w *workflowV2) Get(ctx context.Context, name, namespace, runtime string) (
8180
}
8281
}`,
8382
"variables": map[string]interface{}{
84-
"runtime": runtime,
85-
"name": name,
86-
"namespace": namespace,
83+
"uid": uid,
8784
},
8885
}
8986

@@ -112,6 +109,7 @@ func (w *workflowV2) List(ctx context.Context, filterArgs model.WorkflowsFilterA
112109
edges {
113110
node {
114111
metadata {
112+
uid
115113
name
116114
namespace
117115
runtime

0 commit comments

Comments
 (0)