Skip to content

Adds do_not_enforce_on_create option for github_repository_ruleset #2667

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 3 commits into
base: main
Choose a base branch
from

Conversation

nenosrep
Copy link

Optional attribute added to rules.required_status_checks.
Resolves #2656


Before the change?

  • The option to allow repositories and branches to be created without enforcing status checks were prohibited by default, and would substitute the value of this configuration from the repo to always be false. It was not available for organization rulesets in the schema, which lead to a panic.

After the change?

  • Now it has the option to enable/disable enforce status checks on creation of a new branch/repo, manageable through the provider and without overwriting the configuration in the ruleset without being shown in terraform plan/apply.
  • Defining required checks will no longer result in a panic, as the schema now provides a default value instead of nil.

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

nenosrep added 3 commits May 22, 2025 07:26
What: Expand schema with missing option do_not_enforce_on_create

Why: It is available for github_repository_ruleset and the API
What: Expand test for github_organization_ruleset with
do_not_enforce_on_create

Why: To ensure that the do_not_enforce_on_create option is working
What: Explain do_not_enforce_on_create option and default vaules in
the documentation for the github_organization_ruleset resource

Why: Keep the documentation consistent with the implementation
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.

[FEAT]: Implement do no enforce on create parameter for resource_github_organization_ruleset.go
1 participant