feat: Add support for `copilot_code_review` rule type by JiayangZhou · Pull Request #3857 · google/go-github

Add support for GitHub's Copilot code review feature in repository
rulesets, allowing automatic code review requests for pull requests.

Changes:
- Add RulesetRuleTypeCopilotCodeReview constant to rule types
- Add CopilotCodeReviewRuleParameters struct with review_new_pushes
  and review_draft_pull_requests fields
- Implement marshal/unmarshal logic for copilot_code_review rules
- Add comprehensive test coverage for the new rule type

The copilot_code_review rule supports two configuration options:
- review_new_pushes: Automatically review each new push to the PR
- review_draft_pull_requests: Automatically review draft PRs

@JiayangZhou

@JiayangZhou

@JiayangZhou

gmlewis

@JiayangZhou

@JiayangZhou

@gmlewis gmlewis changed the title feat: Add support for copilot_code_review rule type feat: Add support for copilot_code_review rule type

Dec 7, 2025

stevehipwell

@JiayangZhou

elminster-aom added a commit to elminster-aom/go-github that referenced this pull request

Dec 10, 2025
* forkstream/master:
  chore!: Remove `PullRequestRuleParameters.AutomaticCopilotCodeReviewEnabled` field (google#3866)
  feat: Add support for `copilot_code_review` rule type (google#3857)
  feat: Implement Enterprise SCIM - Delete Groups or Users (google#3856)
  feat: Add `advanced_search` parameter to `SearchOptions` (google#3868)
  fix!: Change Org usage report `Quantity` to `float64` (google#3862)
  build(deps): Bump actions/checkout from 6.0.0 to 6.0.1 in the actions group (google#3863)
  build(deps): Bump golang.org/x/sync from 0.18.0 to 0.19.0 in /tools (google#3864)
  build(deps): Bump golang.org/x/term from 0.37.0 to 0.38.0 in /example (google#3865)
  feat: Implement Enterprise SCIM - Set Groups or Users (google#3858)
  feat: Add support for Enterprise Team APIs (google#3861)
  Bump go-github from v79 to v80 in /scrape (google#3855)
  Bump version of go-github to v80.0.0 (google#3854)
  feat: Add repository target to ruleset (google#3850)