terraform-provider-github
terraform-provider-github copied to clipboard
[MAINT] Fix `github_organization_ruleset` with `push` target
[!WARNING] This PR is "stacked" on top of https://github.com/integrations/terraform-provider-github/pull/2976 Currently relevant commits are after 3752c16 (This might link to correct changeset: https://github.com/integrations/terraform-provider-github/pull/2958/files/519ea54cdb3035806fb28caa2ab6fd0002209b0f..97e235105dcd2dafd1606451729325de56a694c9)
Resolves #2929, #2467
Before the change?
- The provider would crash from a 422 error response when following the example in the docs
- Removing
ref_namewould cause the provider to Panic asref_nameis a required field
After the change?
- The provider should correctly apply
pushrulesets to an organization ref_nameshould no longer be needed to be set forpushtargetconditions&targetvalidation logic should ensure correct fields are populated
Pull request checklist
- [ ] ~Schema migrations have been created if needed (example)~
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
- [ ] Yes
- [x] No
@stevehipwell Yes, I agree. I've done that already in this PR: https://github.com/integrations/terraform-provider-github/pull/2976
But I can't switch the base of this PR to point to that :)