GitHub: the merge waits for a team's approval (Required reviewers)
The pull request rule of a ruleset can require review or approval from specific teams when a pull request changes certain files or directories: "Required reviewers". Each team has its own number of required approvals from its members and its own list of file patterns, so a pull request that touches those files stays blocked until enough members of that team approve it. For an approval from a team member to count, the team must have write permissions or higher for the repository (GitHub's available rules for rulesets, checked October 26, 2026).
"type": "pull_request",
"parameters": {
"required_reviewers": [
{ "file_patterns": ["src/api/**"], "minimum_approvals": 2,
"reviewer": { "id": 42, "type": "Team" } } ] }
How the rule works
- Teams and approvals: a ruleset can name up to 15 teams, and for each team require from 0 to 10 approvals from its members. Requiring zero approvals adds the team to the pull request for visibility, but the team does not need to approve.
- File patterns: each team has a list of file patterns that decides which files the setting applies to, in the same format as a
.gitignorefile. A pattern starting with an exclamation mark (!) is a negation, and patterns are matched in order, so a negated pattern can "unmatch" files that matched an earlier one. - Whose approval counts: approvals from members of the team, and only when the team has write permissions or higher for the repository.
- Which teams can be chosen: for organization-wide rules, a team of the organization; for repository-level rules, a team of the organization that owns the repository. The rule is not available on user-owned repositories, as they do not contain teams.
- Through the REST API: the rule is
required_reviewersin the parameters of thepull_requestrule, each with itsfile_patterns(fnmatch syntax), itsminimum_approvalsand itsreviewer, a team given by its ID (GitHub's REST API endpoints for rules). "Get rules for a branch" returns the active rules that apply to a branch, whether they are configured on the repository or the organization; rules in rulesets that only evaluate, or are disabled, are not returned.
Next to the other review settings
- The same pull request rule: Required reviewers sit in the pull request rule next to the required number of approving reviews, review from code owners, approval of the most recent reviewable push and conversation resolution, and each of those can hold the merge as well.
- Team review assignment: when a team enables auto assignment, any time the team is requested to review a pull request, the team is removed as a reviewer and a subset of its members is assigned in its place, so the pull request may show those members instead of the team (GitHub's managing code review settings for your team).
What to do
- Find the rule: anyone with read access to a repository can view its active rulesets (GitHub's about rulesets). In the pull request rule, the Required reviewers list the teams, their approvals and the file patterns; compare them with the files the pull request changes.
- Ask the team: request a review from the team, or from its members, and wait for the number of approvals the rule asks.
- Approvals that do not count: if members have approved and the merge still waits, check that the team has write permissions or higher for the repository; whoever manages the repository's access gives it to the team.
- The team should not cover these files: whoever manages the ruleset narrows the team's file patterns (a negated pattern can leave files out), or sets its approvals to zero so the team is only added for visibility.
In IntelliJ IDEA: approvals are counted, not matched to the team
How the GitHub support built into IntelliJ IDEA deals with a rule that needs a team's approval, in its source (checked October 31, 2026; IntelliJ IDEA: pullRequestMergeability.graphql, refUpdateRule.graphql, GHPRMergeabilityStateBuilder.kt, GHPRReviewFlowViewModelImpl.kt, GraphQL files, GithubApiRequests.kt):
- Not the rule: none of its 78 GraphQL files asks for
requiredReviewers(the team, file patterns and minimum approvals of the pull request rule), for rulesets or for a team's members, and its list of REST requests has none for them either. - A number: for the base branch it reads one number, the required approving reviews. It keeps that number only while GitHub reports the merge as blocked, the account may push to the branch and every required check has succeeded (or none is required); otherwise it uses 0.
- Its own review state: it counts the reviewers whose review is an approval. If that count reaches the number (with 0, a single approval), the state is accepted; otherwise the state follows GitHub's
reviewDecision. It does not check whether an approval came from the required team. - Requesting the team: a team is requested by its slug (a team review request was replaced by team members).
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a pull request's reviews, checks and conversations next to the diff, and merges it with the methods the target branch allows. When a pull request is blocked, its merge checks say when a review is still required and name the code owners asked to review, and when the branch's rulesets require approvals from teams for certain files, they name those teams with the approvals each needs and the files it covers (a team by its ID once it is no longer asked to review). The review inbox, diffs and conversations are free; approving, commenting, resolving and merging are Pro (US$1.50 a month, with a 30-day trial).
GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: GitHub merge refused (405, 409) · GitHub review refused (422) · GitHub search 422 "Validation Failed" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · "API rate limit exceeded" · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub line comment outdated or not on the diff · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for an approval of the most recent push · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub pull request not closing or reopening · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a Dependabot pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語