-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feat add environment client #166
Conversation
UserRequiresApproval bool `json:"userRequiresApproval,omitempty"` | ||
Targets string `json:"targets,omitempty"` | ||
PrPlanOnly bool `json:"prPlanOnly,omitempty"` | ||
// TODO: not sure about this one |
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.
not sure about the type, gonna test it when I add deployments on update
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.
maybe map[string]interface{}
?
https://stackoverflow.com/questions/40559250/golang-dynamically-creating-member-of-struct
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.
I will change it on the pr for this ticket that way I'll also actually test it
|
||
type ConfigurationChangesSchema struct { | ||
Type string `json:"type,omitempty"` | ||
// TODO: not sure this works |
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.
like the one above (this is part of deployment request)
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.
this one looks like the same object in api.d.ts
so I think it's ok and should work.
type PartialJSONSchema7 = { type?: 'string'; enum?: string[] };
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.
Looking good
just lots of question regrading the types
// TODO: not sure about this one | ||
CustomEnv0EnvironmentVariables *interface{} `json:"customEnv0EnvironmentVariables,omitempty"` | ||
GitUserData *GitUserData `json:"gitUserData,omitempty"` | ||
TriggerName string `json:"triggerName,omitempty"` |
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.
not for this pr but this one should be User
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.
you mean on the resource? if so it will be added here
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.
the value of TriggerName
should be User
Issue & Steps to Reproduce / Feature Request
adding api client for environments
I'm gonna split the ticket.
first part - basic environment CRUD, with only part of the fields on the resource
second part - rest of the fields ( some field updates require different endpoints such as updateEnvironemntTTL, deployEnvironment etc)