You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT]: Support dismissal_restriction on the ruleset pull_request rule #3698
Support dismissal_restriction on the pull_request rule of github_repository_ruleset and github_organization_ruleset.
A branch protection rule can restrict who may dismiss pull request reviews (restrict_dismissals / dismissal_restrictions). A ruleset can't express that through this provider. So a repository that moves its policy from github_branch_protection to github_repository_ruleset, as recommended in #3257, quietly lets anyone with write access dismiss reviews. That's a loosening nobody asked for, and nothing reports it.
The API already accepts it, and every ruleset the provider creates already returns the field, disabled:
enabled = true with no allowed_actors means "only those who can bypass the ruleset", the equivalent of restrict_dismissals = true with empty dismissal_restrictions on branch protection.
actor_type takes User, Team, IntegrationInstallation or RepositoryRole, which isn't the same set as bypass actors (an app is IntegrationInstallation here but Integration there), so it needs its own validation.
GitHub returns dismissal_restriction whether or not one is set, so reading it back as-is would make every configuration without the block diff forever. A disabled restriction with no actors should read back as unset.
Both ruleset resources carry their own copy of the pull_request schema, but expandRules/flattenRules are shared.
This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.
You can help us prioritize by adding details, reproduction steps, or a 👍 to issues that matter to you, and by joining the discussion on open issues and PRs.
Linking #3715 from @Overbryd here for reference. We closed it as part of our temporary move to an issue-first model (see CONTRIBUTING.md), and want to keep the context and implementation approach handy when we pick this issue up.
Adding a data point from a migration we have had to postpone because of this.
GitHub's "Migrate to rulesets" tool (changelog, 2026-08-11) keeps the dismissal restriction when it converts a branch protection. A protection with restrict_dismissals = true and one team in dismissal_restrictions came out as:
So GitHub's own migration path treats the restriction as part of the policy, while a migration done through this provider has to drop it. For teams that manage their repositories with Terraform, moving from github_branch_protection to github_repository_ruleset loosens who can dismiss reviews on every repository, where the UI migration would not. We manage about thirty repositories this way and are staying on github_branch_protection until this is supported.
Two notes for whoever picks this up:
The converter writes the team as its numeric ID ("id": <team id>, "type": "Team"). github_branch_protection takes node IDs in dismissal_restrictions, so a migration guide should mention the change of identifier.
Activity
github-actions commentedon Oct 22, 2026
👋 Hi, and thank you for opening this issue!
This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.
You can help us prioritize by adding details, reproduction steps, or a 👍 to issues that matter to you, and by joining the discussion on open issues and PRs.
🤖 This is an automated message.
robert-crandall commentedon Nov 25, 2026
Linking #3715 from @Overbryd here for reference. We closed it as part of our temporary move to an issue-first model (see CONTRIBUTING.md), and want to keep the context and implementation approach handy when we pick this issue up.
ezcyo-tf1 commentedon Dec 1, 2026
Adding a data point from a migration we have had to postpone because of this.
GitHub's "Migrate to rulesets" tool (changelog, 2026-08-11) keeps the dismissal restriction when it converts a branch protection. A protection with
restrict_dismissals = trueand one team indismissal_restrictionscame out as:{ "type": "pull_request", "parameters": { "required_approving_review_count": 1, "dismiss_stale_reviews_on_push": true, "require_code_owner_review": true, "required_review_thread_resolution": true, "dismissal_restriction": { "enabled": true, "allowed_actors": [{ "id": 1234567, "type": "Team" }] } } }So GitHub's own migration path treats the restriction as part of the policy, while a migration done through this provider has to drop it. For teams that manage their repositories with Terraform, moving from
github_branch_protectiontogithub_repository_rulesetloosens who can dismiss reviews on every repository, where the UI migration would not. We manage about thirty repositories this way and are staying ongithub_branch_protectionuntil this is supported.Two notes for whoever picks this up:
"id": <team id>, "type": "Team").github_branch_protectiontakes node IDs indismissal_restrictions, so a migration guide should mention the change of identifier.