Skip to content

Fixed next branch push rejected by the stable-branch ruleset - #58

Merged
alongosz merged 2 commits into
5.0from
fix-next-branch-push-identity
Sep 7, 2026
Merged

alongosz merged 2 commits into
5.0from
fix-next-branch-push-identity

Conversation

@alongosz

@alongosz alongosz commented Sep 7, 2026

Copy link
Copy Markdown
Member
🎫 Issue n/a

Related PRs:

Description:

"Prepare next branch" stopped landing on 2026-09-04, when the Restrict stable branch creation/updates ruleset went active: run 33881442848 (6.0), run 33881441213 (5.0).

remote: error: GH013: Repository rule violations found for refs/heads/6.0-next.
remote: - Cannot update this protected ref.

The ruleset's ref_name pattern is fnmatch, not regex, so refs/heads/[0-9]*\.[0-9]* matches X.Y-next too. GET /repos/ibexa/admin-ui-assets/rules/branches/6.0-next reports the same four rules as for 6.0. That's fine, those branches are worth protecting.

The actual problem is the push identity. It goes out as github-actions[bot], the credential actions/checkout persists from the default GITHUB_TOKEN, and that identity is not on the bypass list. Repo admins, @ibexa/quality-assurance, @ibexa/php-dev, @ibexa/javascript-dev and the Ibexa Workflow Automation #1 App are. The App was already dispatching these runs, it just never did the push.

  • Generated an Ibexa Workflow Automation #1 installation token and passed it to actions/checkout, so the persisted credential, and therefore the push, uses the exempt identity. Same pattern as ibexa/gh-workflows/.github/workflows/upmerge.yml.
  • Switched the commit identity to the App's own bot user. The numeric user ID comes from gh api /users/<app-slug>[bot] at runtime, so the noreply address survives a rename of the App.
  • [GHA] Updated actions/checkout to v7 and set runs-on to ubuntu-26.04, matching the bundle-generator skeleton.

Note

The [GHA] bump is here and not in #57 because that one is based on 4.6, where build-next-branch.yaml doesn't exist. Workflows living only on 5.0+ fall through the net of a 4.6-based standardization wave.

Needs a merge up to 6.0. The workflow file is byte-identical on both branches, so it should be clean.

For QA:

No QA required. Verification is a workflow_dispatch of "Prepare next branch" on 5.0 and 6.0 after the merge up, confirming the push to 5.0-next / 6.0-next lands.

Documentation:

No documentation required.

🤖 Generated with Claude Code

The push landed as `github-actions[bot]` -- the credential
`actions/checkout` persists from the default `GITHUB_TOKEN`. That
identity is not on the bypass list of the "Restrict stable branch
creation/updates" ruleset, which went active on 2026-09-04 and matches
`X.Y-next` as well as the stable branches themselves. Only repo admins,
`@ibexa/quality-assurance`, `@ibexa/php-dev`, `@ibexa/javascript-dev`
and the `Ibexa Workflow Automation #1` App may bypass it, so every run
since has failed with GH013.

Generated an installation token for that App and passed it to
`actions/checkout`, so the persisted credential -- and therefore the
push -- uses the exempt identity. The commit identity moves to the
App's own bot user; its numeric ID is resolved at runtime so the
noreply address survives a rename of the App.

Same pattern as `ibexa/gh-workflows/.github/workflows/upmerge.yml`.
The fleet-wide GHA standardization (#57) is based on 4.6, where
`build-next-branch.yaml` does not exist, so this workflow falls through
its net and keeps the old pins after the merge up. `actions/checkout@v4`
also still targets the deprecated Node 20.

Versions match the bundle-generator skeleton.
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@alongosz
alongosz merged commit b0e4174 into 5.0 Sep 7, 2026
18 checks passed
@alongosz
alongosz deleted the fix-next-branch-push-identity branch September 7, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants