Skip to content

[Bug] /split-portfolio does not configure branch protection on the private portfolio repo #415

@atlas-apex

Description

@atlas-apex

Given / When / Then

Given an adopter runs /split-portfolio to create a private portfolio repo

When the repo is created and configured

Then no branch protection is set up on the new repo's main branch, allowing direct pushes that bypass the PR workflow

Repro

  1. Run /split-portfolio to create a private portfolio repo
  2. Check gh api repos/<owner>/<portfolio>/branches/main/protection
  3. No protection rules exist

Expected

/split-portfolio should:

  1. Attempt to enable branch protection via gh api repos/.../branches/main/protection -X PUT
  2. If the GitHub plan doesn't support it (free plan + private repo → 403), print a warning explaining the limitation
  3. Document that agent-side enforcement (block-main-push.sh) is the only gate on free plans

Severity

Medium — the agent-side hook catches most cases, but direct git push to main from a non-Claude terminal is ungated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions