Skip to content

Conversation

@dblinkhorn
Copy link
Contributor

Resolves #2803


Before the change?

  • Updating a github_repository_ruleset that never had bypass_actors defined would fail with a 422 Invalid request. Invalid property /bypass_actors: data cannot be null. error
  • This bug was introduced in v6.7.0 when fixing the original bypass actors deletion bug in fix: bypass actors not being deleted from repository rulesets #2780
  • The provider was always using UpdateRulesetNoBypassActor, which sends bypass_actors: null when the field was never defined, causing GitHub API to reject the request

After the change?

  • Rulesets without bypass_actors can now be updated without errors
  • The provider conditionally uses UpdateRulesetNoBypassActor only when d.HasChange("bypass_actors") is true
  • When bypass_actors hasn't changed, uses UpdateRuleset which omits the field entirely
  • Adds a new test case to ensure bug is not re-introduced

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

@nickfloyd nickfloyd moved this to In Review in Terraform Provider Oct 29, 2025
@nickfloyd nickfloyd added the Type: Bug Something isn't working as documented label Oct 29, 2025
Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@nickfloyd nickfloyd merged commit f221e26 into integrations:main Oct 29, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Terraform Provider Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Something isn't working as documented

Projects

Development

Successfully merging this pull request may close these issues.

[BUG]: Invalid property /bypass_actors: data cannot be null

2 participants