Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

Manage the Code Coverage Ruleset Condition with GitHub’s REST API

GitHub REST API management for the Restrict code coverage ruleset condition is generally available, with minimum coverage and maximum-drop thresholds.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub’s REST API can now create, update, and read the Restrict code coverage repository ruleset option. GitHub announced API management as generally available on September 18, 2026. The condition can block a pull request from merging when its line coverage misses a configured minimum or drops too far relative to the default branch. You need GitHub Code Quality enabled and coverage uploads configured before the rule can evaluate results.

What the code coverage condition enforces

The Restrict code coverage ruleset condition supports two threshold types. A repository can configure a minimum line coverage level for the pull request branch, a maximum tolerated line-coverage drop compared with the default branch, or both. A pull request is blocked from merging if either configured threshold is not met. GitHub describes the rule in its ruleset documentation.

Threshold What it checks When it may fit
Minimum line coverage Whether aggregated line coverage on the pull request branch is at least the configured percentage. Use when the repository wants a floor that applies regardless of its default-branch coverage.
Maximum line-coverage drop Whether the pull request branch’s coverage falls by more than the configured number of percentage points relative to the default branch. Use when the repository wants to limit regression against its current baseline.

The threshold should reflect the repository’s existing baseline and how its coverage is generated. GitHub’s announcement and ruleset documentation do not prescribe a numeric value, so choose one based on the project’s coverage data rather than applying an arbitrary universal target.

Prerequisites and availability

  • Coverage readiness: GitHub Code Quality must be enabled, and the repository must have code coverage uploads configured.
  • Eligible plans: GitHub says the feature is available on GitHub Team and GitHub Enterprise Cloud, including Enterprise Cloud with data residency. It is not available on GitHub Enterprise Server.
  • API permissions: Creating or updating repository rulesets requires Administration repository permissions with write access. The REST reference examples specify X-GitHub-Api-Version: 2026-03-10.

GitHub’s September 18, 2026 changelog announcement calls REST API management generally available. The separate ruleset feature page labels Restrict code coverage as public preview. These labels may describe different aspects—the API management release status and the feature’s status—so check the current GitHub UI and API documentation if preview status affects your rollout.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manage the condition through the REST API

GitHub documents repository ruleset create, read, and update operations in its repository rulesets REST API reference. The announcement establishes that those operations can manage the code coverage option, but the generic endpoint schema available in that reference does not specify the new condition’s JSON property or exact payload shape.

For that reason, do not copy an unrelated ruleset example and assume its fields configure code coverage. Before sending a create or update request, verify the current endpoint schema or a live GitHub example for the exact condition fields. The available documentation supports the feature’s availability and behavior, but not a ready-to-run request body.

Make sure coverage uploads are evaluated before merge

The rule evaluates coverage data that has already been uploaded; it does not wait for uploads to finish. If an expected coverage upload has not completed when the ruleset evaluates the pull request, that result may not be included in the decision. GitHub therefore recommends making each status check associated with an expected coverage upload a required status check. This ties merge readiness to the checks that produce the data the coverage condition is meant to evaluate.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose an enforcement threshold

Use the minimum threshold to enforce an absolute floor, the maximum-drop threshold to constrain regression against the default branch, or both when the repository needs both safeguards. Review the project’s current baseline and ensure its coverage workflow reliably uploads the expected results before setting enforcement. No single percentage or drop limit is established as appropriate for every repository.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.