Skip to content

main is protected by a required status check named "check" that CI never reports, blocking every PR #14

Closed

Description

@Oyinkans0la12

The active ruleset on main (name sdk-protection, id 23295775) requires a status check with the context check:

$ gh api repos/Oyinkans0la12/splitstream-sdk-cli/rules/branches/main
[... {"type":"required_status_checks",
      "parameters":{"strict_required_status_checks_policy":true,
                    "required_status_checks":[{"context":"check"}]}} ...]

But the workflow declares its job as ci:

# .github/workflows/ci.yml
jobs:
  ci:
    name: ci

and that is the only check it reports — the head commit of #13 has exactly one check run:

ci    completed    success

GitHub matches a required check by its exact name, so check can never be satisfied. Every pull request therefore sits at mergeStateStatus: BLOCKED even when CI is green:

$ gh pr view 13 --json mergeStateStatus,mergeable
{"mergeStateStatus":"BLOCKED","mergeable":"MERGEABLE"}

The only way to land a merge under this rule is a ruleset bypass (gh pr merge --admin), which is exactly the habit branch protection exists to prevent — and it silently trains maintainers to skip CI.

Fix — pick one and make the two sides agree:

  1. Point the rule at the check that actually exists: Settings → Rules → sdk-protection → Require status checks → replace check with ci. (If a check was ever reported under the wrong name, the stale entry also needs removing.)
  2. Or rename the job in ci.yml (name: check) so the workflow reports what the rule already asks for.

Option 1 is the smaller change; either way the required context must equal the job's name byte for byte, including when a job is renamed later. Note that the ruleset is read-only for this token via the branches endpoint but writable with Administration: write, which the Codespaces token may not have — the edit may have to be done in the UI.

While you are in there, check the other new-looking parameter: require_extra_approval_for_unattributed_changes: true means a pull request whose commits cannot all be attributed to a GitHub account needs an extra approval, which will surprise a bot or a squashed-from-elsewhere contribution. Decide whether that is intended here.

Activity

  1. added
    bug
    help wanted
    on Sep 14, 2026
  2. Oyinkans0la12 commented on Sep 14, 2026

    @Oyinkans0la12
    CollaboratorAuthor

    Resolved — the ruleset on main now requires the check CI actually reports:

    $ gh api repos/Oyinkans0la12/splitstream-sdk-cli/rules/branches/main \
        --jq '.[] | select(.type=="required_status_checks") | .parameters.required_status_checks'
    [{"context":"ci","integration_id":15368}]
    

    ci (integration 15368) is the job .github/workflows/ci.yml reports, so the required context and the reported check agree again. PR #13 then merged through the normal path and its run on main is green — no --admin bypass, no --auto fallback.

    Keeping the general lesson in the thread: the required context must match the job's name byte for byte, so a job rename in ci.yml is now a change to branch protection too.

  3. removed
    bug
    help wanted
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions