Skip to content

Protect main with a ruleset: require CI and drift-check, block force-push #218

Closed

Description

@TMHSDigital

Why it matters

Every merge to main triggers release.yml, which tags and publishes to npm and the MCP Registry. main has no protection, so a direct push or a merge with red CI ships to users. #190 covers the release workflow not waiting for CI, and #191 covers action hardening; neither covers repository rules.

Evidence

  • gh api repos/TMHSDigital/screencast-mcp/branches/main/protection returns 404 (not protected).
  • /rulesets is empty.

Suggested approach

Add a ruleset on main:

  • require pull requests
  • require the CI matrix (Ubuntu and Windows) and drift-check to pass
  • block force-pushes and deletion
  • optionally require linear history

Allow an admin bypass for emergencies.

Done when

  • A PR with failing CI cannot be merged.
  • A direct push to main is rejected.

Activity

  1. added
    effort: small
    impact: medium
    release
    on Oct 25, 2026
  2. TMHSDigital commented on Nov 19, 2026

    @TMHSDigital
    OwnerAuthor

    The part that fits this repo's workflow is in place: the active ruleset "main protection" blocks force-pushes and deletion of main. Requiring pull requests and status checks is not planned, because main takes direct commits. release.yml already tags and publishes only a commit with a green CI run (#190), so a red push does not ship.

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

    cieffort: smallimpact: mediumpriority: mediumrelease

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions