Skip to content

check-branch can never pass: policy requires 'beta' or 'hotfix/*' but petstore has no beta/development branch #9

Description

@rubenvdlinde

Symptom

check / check-branch fails on any ordinary pull request into main:

::error::Pull requests to main must come from 'beta' or a 'hotfix/*' branch.
Your branch 'fix/phpmd-ignore-namespaces' does not match any allowed pattern.

Observed on #8https://github.com/ConductionNL/petstore/actions/runs/30797406688/job/91634009106

Cause

.github/workflows/branch-protection.yml calls the shared
ConductionNL/.github/.github/workflows/branch-protection.yml@main, which
enforces the fleet's development → beta → main promotion flow.

petstore has neither a beta nor a development branch. git ls-remote --heads origin returns only main plus feature branches, and the repo's
default branch is main.

So the policy permits exactly two sources into mainbeta (does not exist)
and hotfix/*. No ordinary contribution branch can ever satisfy it. The
only way to land a normal change today is to mislabel it as a hotfix/*, which
defeats the point of the check and pollutes the branch vocabulary.

This is a pre-existing repo/policy mismatch, not caused by any one PR — it will
block every future PR into main the same way.

Options

  1. Create the missing branches (development, beta) and adopt the fleet
    promotion flow, so the shared policy is satisfiable as written. Consistent
    with the rest of the fleet.
  2. Opt petstore out of the shared branch-protection workflow, or pass it a
    configuration that reflects a single-branch repo, if petstore is
    deliberately main-only (it is a demo/reference app).

Option 2 is probably right if petstore is intentionally main-only; option 1 if
it should behave like the other apps. This needs a decision rather than a patch.

Blocked on this

#8 (fix(quality): phpmd DevelopmentCodeFragment could never fire on namespaced code) cannot go green while this stands. That PR's own change is measured
neutral — 0 new phpmd findings — but check-branch fails independently.

Activity

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