terraform-provider-github
terraform-provider-github copied to clipboard
fix: state for required workflow on organization rules
Resolves #2657
Before the change?
The required_workflows section inside a GitHub organization_ruleset was not correctly saved in the Terraform state. This caused drift or prevented proper detection of the current configuration.
After the change?
The flattenRules function has been updated to handle the workflows rule type properly, parsing and flattening the required workflow structure (repository ID, path, and ref). A new test was added to validate updates to required workflows in an organization ruleset, confirming the state is now correctly stored and updated.
Pull request checklist
- [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