GitHub GraphQL API adds code coverage and code quality rule parameters
Introduced 2026-09-21 · score 0.92
HOW TO USE IT
When configuring a repository ruleset through GraphQL, set `RuleParametersInput.codeCoverage` for coverage thresholds or `codeQuality` for review severity; specify only one field in `RuleParametersInput`.
WHY THIS HELPS
Configure code coverage or code quality parameters when maintaining repository rule configurations through GraphQL.
REQUIREMENTS AND LIMITATIONS
- RuleParametersInput.codeCoverage: Parameters for the `code_coverage` rule type. Only one field of `RuleParametersInput` should be specified.
- RuleParametersInput.codeQuality: Parameters for the `code_quality` rule type. Only one field of `RuleParametersInput` should be specified.
- CodeCoverageParametersInput.maxCoverageDrop: Maximum line coverage drop, in percentage points, relative to the default branch; setting a value of 0 disables the threshold.
- CodeCoverageParametersInput.minimumCoverage: Minimum line coverage percentage; setting a value of 0 disables the threshold.
- CodeQualityParametersInput.severity (required): Lowest severity level at which code quality reviews must be resolved before commits can be merged.
- CodeQualitySeverity.ALL: All severity levels.
- CodeQualitySeverity.ERRORS: Errors.
- CodeQualitySeverity.NOTES: Notes and higher.
- CodeQualitySeverity.WARNINGS: Warnings and higher.
- Prerequisite: For code coverage rules, GitHub Code Quality must be enabled and coverage data must be uploaded to GitHub for the pull request branch.
- Prerequisite: Coverage rules do not wait for coverage uploads; make each status check associated with an expected coverage upload a required status check to ensure coverage is evaluated before merging.
- Prerequisite: When a code quality rule is configured, a code quality analysis must be done on the pull request before changes can be merged.
FIRST-PARTY EVIDENCE
- https://docs.github.com/en/graphql/overview/changelog#schema-changes-for-2026-09-21
- https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/repos
- https://docs.github.com/en/code-security/how-tos/maintain-quality-code/restrict-code-coverage
- https://docs.github.com/en/graphql/reference/code-scanning
Check the installed version and the source before using it. Entry JSON