-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api): workflow as code improvements #3423
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a1e9010
to
6466076
Compare
sdk/cdsclient/client_export.go
Outdated
path := fmt.Sprintf("/project/%s/pull/workflows/%s", projectKey, name) | ||
if exportWithPermissions { | ||
/*if exportWithPermissions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
sdk/cdsclient/client_export.go
Outdated
} | ||
bodyReader, _, _, err := c.Stream(context.Background(), "GET", path, nil, true) | ||
func (c *client) WorkflowExport(projectKey, name string, mods ...RequestModifier) ([]byte, error) { | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
sdk/workflow.go
Outdated
return has | ||
} | ||
|
||
if hasKey("git.branch") && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return
dumper.ExtraFields.Len = false | ||
dumper.ExtraFields.Type = false | ||
|
||
mI, _ := dumper.ToMap(i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment: // compare interface keys with default payload keys
sdk/workflow.go
Outdated
mI, _ := dumper.ToMap(i) | ||
mD, _ := dumper.ToMap(WorkflowNodeContextDefaultPayloadVCS{}) | ||
var kI, kD []string | ||
for k := range mI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(mI) != len(mD) {
return false
}
for k := range mD {
if ! hasKey(k) {
return false
}
}
better than reflect.DeepEqual ?
@ovh/cds