Skip to content

Rulesets - do not require status checks on creation #3244

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

Closed
MattMencel opened this issue Aug 22, 2024 · 0 comments · Fixed by #3245
Closed

Rulesets - do not require status checks on creation #3244

MattMencel opened this issue Aug 22, 2024 · 0 comments · Fixed by #3245

Comments

@MattMencel
Copy link
Contributor

Under the "Require status checks to pass" section of rulesets there is a setting that is not available in the SDK.

Do not require status checks on creation

gh cli shows it available on the API as do_not_enforce_on_create

gh api  \
        -H "Accept: application/vnd.github+json" \
        -H "X-GitHub-Api-Version: 2022-11-28" \
        /repos/ORG/REPO/rulesets/RULESET_ID
 ...
     {
      "type": "required_status_checks",
      "parameters": {
        "strict_required_status_checks_policy": true,
        "do_not_enforce_on_create": true,
        "required_status_checks": [
          {
            "context": "CI Check"
          }
        ]
      }
    }
...

I would like to manage this through the Terraform provider which uses this SDK.

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 a pull request may close this issue.

1 participant