Skip to content

fix: state for required workflow on organization rules #2658

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oscarbc96
Copy link

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

  • 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
  • No

@oscarbc96 oscarbc96 changed the title fix state for required workflow on organization rules fix: state for required workflow on organization rules May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Required Workflow is not saved in the state
1 participant