-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add support for environments and environment secrets #1847
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1847 +/- ##
==========================================
+ Coverage 97.59% 97.63% +0.03%
==========================================
Files 104 105 +1
Lines 6615 6716 +101
==========================================
+ Hits 6456 6557 +101
Misses 86 86
Partials 73 73
Continue to review full report at Codecov.
|
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.
Thank you, @srgustafson8 !
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
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.
Thank you, @srgustafson8!
Just a few more tweaks, please, and then we should be ready for a second LGTM before merging.
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Thank you for the reviews @gmlewis - those should now be resolved! |
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.
Thank you, @srgustafson8 !
LGTM.
Awaiting second LGTM before merging.
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.
💙
Thank you, @wesleimp ! |
Owner *string `json:"owner,omitempty"` | ||
Repo *string `json:"repo,omitempty"` | ||
EnvironmentName *string `json:"environment_name,omitempty"` | ||
WaitTimer *int `json:"wait_timer,omitempty"` | ||
Reviewers []*EnvReviewers `json:"reviewers,omitempty"` | ||
DeploymentBranchPolicy *BranchPolicy `json:"deployment_branch_policy,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.
I wonder if I can make a comment here for some clarification on what these fields actually mean. The fields below cover the response from the API for this object, but afaict these highlighted fields are always nil.
I am sure I am missing something, so if possible could someone explain what they are for?
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 official docs say this:
Note: To get information about name patterns that branches must match in order to deploy to this environment, see "Get a deployment branch policy."
Does that help?
Do you want to create a PR explaining your understanding of the official docs to this repo?
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.
hi @jvm986 - if you're referring to the Return/response
only values (lines 22-30) I believe I put them in as they featured in the response schema when getting an environment. Are you seeing them null/nil in both Get & Create operations?
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.
Hi guys, thanks for the response!
I am referring to the highlighted vales (Owner
Repo
EnvironmentName
WaitTimer
Reviewers
DeploymentBranchPolicy
). I am seeing only nil values in GET
operations (this struct is only used in GET
operations at this point --> ListEnvironments()
& GetEnvironment()
, we are using the CreateUpdateEnvironment
struct for PUT
operations with CreateUpdateEnvironment()
) and these values do not appear in the docs.
Again, I might be missing something. But for example the WaitTimer
value I am currently parsing from the ProtectionRules
slice in my code as it's nil in the struct:
In cases like these, where you are expecting to get a value back from the server but it is missing, one of the best ways to debug is to add something like https://github.com/gmlewis/go-httpdebug to your code and make the call again to see the curl-equivalent of the call you are making. Then try to make the same call actually using If If, however, Good luck, and let us know if we can help. |
Closes #1843