Repository navigation
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.
|
Co-authored-by: Glenn Lewis <[email protected]>
left a comment
There was a problem hiding this comment.
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 <[email protected]>
commented
Apr 6, 2021
Thank you for the reviews @gmlewis - those should now be resolved! |
left a comment
There was a problem hiding this comment.
Thank you, @srgustafson8 !
LGTM.
Awaiting second LGTM before merging.
commented
Apr 8, 2021
|
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.
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.
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.
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.
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:

commented
Apr 1, 2023
|
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