[BUG]: Ruleset, required_check should be optional #2467
Labels
Status: Triage
This is being looked at and prioritized
Type: Bug
Something isn't working as documented
Expected Behavior
I want to create a ruleset with a required status check with only "Require branches to be up to date before merging" enabled, like this (created through the UI):
Actual Behavior
Error:
│ Error: PUT https://api.github.com/repos/RoyalAholdDelhaize/gso-tech-test-marco_mansi-1/rulesets/2669259: 422 Validation Failed [{Resource: Field: Code: Message:Invalid rule 'required_status_checks': Invalid parameter required_status_checks: Invalid array contents. Errors at index 0: Expected context to be present}]
│
│ with module.gso_github_repo["gso-tech-test-marco_mansi-1"].github_repository_ruleset.ruleset,
│ on gso_github_repo/main.tf line 84, in resource "github_repository_ruleset" "ruleset":
│ 84: resource "github_repository_ruleset" "ruleset" {
Terraform Version
Terraform 1.9.8
integrations/github 6.3.1
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
I am using this code:
The required_check block is required and context too. But it cannot be empty
Debug Output
No response
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: