[FEAT]: Add automatic_copilot_code_review_enabled support for repository rules
Describe the need
gh api repos/org/repo/rules/branches/main returns
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": true,
"require_last_push_approval": true,
"required_review_thread_resolution": true,
"automatic_copilot_code_review_enabled": true,
"allowed_merge_methods": [
"merge",
"squash",
"rebase"
]
},
Which shows the flag automatic_copilot_code_review_enabled
Terraform provider should support setting this flag
SDK Version
No response
API Version
No response
Relevant log output
Unexpected attribute: An attribute named "automatic_copilot_code_review_enabled" is not expected here
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Would love this feature too. FYI - there's another request for this: https://github.com/integrations/terraform-provider-github/issues/2583
YES PLEASE!!!!!
+100
This is needed - Duplicate #2583
💯
As an update to this, there is now a second, newer way to enable Copilot Code Review on a Ruleset. It is enabled via its own rule, which lives outside of the pull_request rule.
This new way/rule shows as "type": "copilot_code_review" and has some new features that don't exist in the original way, namely options for:
- Review new pushes: Copilot automatically reviews each new push to the pull request.
- Review draft pull requests: Copilot automatically reviews draft pull requests before they are marked as ready for review.
So, as of now, there are 2 different ways to accomplish this:
- In a Ruleset, under the PR settings
- In a Ruleset using a new top-level option, along with 2 new sub-settings
Hey @nnellanspdl
Thanks for bringing this to our attention! We're focusing on some big underlying changes to get v7.0 released and won't most likely be working on new features until then.
If you'd want to contribute a PR we'd be very grateful for that! ☺️
Hey @deiga would you please review this PR based on the suggestion from @nnellanspdl
this feature is based on https://github.blog/changelog/2025-09-10-copilot-code-review-independent-repository-rule-for-automatic-reviews/