Skip to content

fix: auto-create missing split repos and cancel superseded runs#65

Merged
markshust merged 1 commit into
developfrom
feature/split-auto-create-repos
May 12, 2026
Merged

fix: auto-create missing split repos and cancel superseded runs#65
markshust merged 1 commit into
developfrom
feature/split-auto-create-repos

Conversation

@markshust
Copy link
Copy Markdown
Collaborator

Summary

  • Auto-create missing split repos before the matrix fans out, so a plain merge to develop that introduces a new package doesn't fail at the git push step with "Repository not found" (as just happened for the three page-cache packages in run 25739254101). Previously, repo auto-creation only ran during bin/release.sh.
  • Cancel superseded branch runs. cancel-in-progress was hard-coded to false, so rapid pushes to develop queued and each run repeated the full 80-package split. Now branch pushes cancel older runs; tag pushes (release artifacts) never cancel.

The auto-create step calls the existing idempotent bin/create-split-repos.sh (~1s when no repos are missing, single batched gh repo list call).

Token scope note

SPLIT_TOKEN must be able to create repos under marko-php:

  • Classic PAT: repo scope
  • Fine-grained PAT: Administration: write + Contents: write on the org

If the current token only has push rights, the new step will fail and the token needs to be rotated/broadened.

Test plan

  • Verify SPLIT_TOKEN has repo-creation permission on marko-php (or rotate it)
  • Merge PR and confirm Split Packages workflow's setup job runs create-split-repos.sh successfully (no-op since all current repos exist)
  • Confirm the matrix split still completes for all packages
  • On next package add, confirm the missing repo is auto-created without manual intervention
  • Push twice in rapid succession to a feature merge → confirm the older run is canceled

🤖 Generated with Claude Code

Two related fixes to the Split Packages workflow:

1. **Auto-create missing split repos.** The setup job now runs
   bin/create-split-repos.sh before the matrix fans out. Previously,
   auto-creation only happened via bin/release.sh, so a plain merge to
   develop that introduced a new package would fail at the git push
   step with "Repository not found" — as just happened for the three
   page-cache packages in run 25739254101. The script is idempotent
   and completes in ~1s when no repos are missing.

2. **Cancel superseded branch runs.** cancel-in-progress was hard-coded
   to false, so rapid pushes to develop queued and each run repeated
   the full 80-package split. Now branch pushes cancel older runs while
   tag pushes (release artifacts) never cancel.

Note: SPLIT_TOKEN must have permission to create repos under marko-php
(classic: repo scope; fine-grained: Administration: write + Contents:
write). If the current token only has push rights, this step will fail
and the token needs to be rotated/broadened.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label May 12, 2026
@markshust markshust merged commit 2d902cb into develop May 12, 2026
1 check passed
@markshust markshust deleted the feature/split-auto-create-repos branch May 12, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant