-
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
Repository environment creation fails on private Teams repos #2602
Comments
Please read #2467 and see if that answers your questions. |
@gmlewis It seems unrelated to me. I'm very new to My core issue is that the API is expecting different objects from Enterprise and Teams customers. |
OK, thanks, @AnitaErnszt - so would it help to split it into two separate endpoints? |
I suppose another option might be to add a flag that alters its behavior. Thoughts? |
@gmlewis do you mean creating separate endpoints based on pricing plan (one for teams/pro where I'm still checking in the TF provider if it's possible to access the pricing plan to decide which endpoint to call. If not, we might have to call the enterprise endpoint first, and if it returns 422 make an attempt to call the teams endpoint. However, in this case, would it not be better to make a retry attempt here, rather than downstream? |
Hi @AnitaErnszt - honestly, I don't know what the best answer is. I also no longer have access to GitHub Enterprise, so it makes it very challenging to experiment and further investigate. Maybe others who also use GitHub Enterprise might be able to comment? |
This is related to the discussion on the integrations/terraform-provider-github#1262
In June GitHub made the environments and environment protection rules generally available, however, the
wait_timer
andreviewers
remains limited to enterprise.Many developers would like to make use of this great new feature, but the bug in the Terraform provider currently proves to be a blocker.
The provider uses the
go-github
Go library under the hood and makes the following call:where the
&updateData
is agithub.CreateUpdateEnvironment
struct.Looking at the code it seems that instead of sending nil value for
wait_timer
it defaults to 0.This is causing the issue for us, as the API doesn't expect this parameter and returns 422.
I understand why the
omitempty
was removed, so I'm looking at what alternative solutions are possible to ensure environments fully work regardless of the payment plan.The text was updated successfully, but these errors were encountered: