Skip to content

fix: drop workflow-file PUT that 404s on freshly created split repos#87

Merged
markshust merged 1 commit into
developfrom
feature/split-repo-config-empty-repo-fix
May 26, 2026
Merged

fix: drop workflow-file PUT that 404s on freshly created split repos#87
markshust merged 1 commit into
developfrom
feature/split-repo-config-empty-repo-fix

Conversation

@markshust
Copy link
Copy Markdown
Collaborator

Summary

  • bin/sync-split-repo-config.sh PUT a close-pull-requests.yml workflow file to each split repo via the GitHub contents API. On a repo created seconds earlier by gh repo create, the contents API returns 404 "This repository is empty." because there's no default-branch commit yet. That killed the setup job in split.yml and prevented the split matrix from running (hit on the PR feat(database-readwrite): add marko/database-readwrite package #86 release for marko-database-readwrite).
  • The workflow file was effectively dead code: subtree splits force-push the package directory to refs/heads/main and refs/heads/develop on every release, so the file never survived on any working split repo (verified against marko-authentication). Removing the PUT keeps only the settings PATCH (homepage, has_projects), which works fine on empty repos.
  • Also deletes the now-orphaned bin/split-repo-workflow.yml template.

Test plan

  • PATCH call still uses --silent 2>/dev/null || true, so it's safe on any repo state.
  • After merge, re-run the failed split workflow (run 26474291068) — EXISTING_REPOS check will skip create+sync for marko-database-readwrite (repo already exists), then the matrix's git push populates it.

🤖 Generated with Claude Code

The sync-split-repo-config.sh script PUT a close-pull-requests workflow
file to each split repo via the GitHub contents API. On a repo created
seconds earlier by gh repo create, the contents API returns 404 "This
repository is empty." because there is no default-branch commit yet,
which killed the setup job and prevented the split matrix from running
(observed on the PR #86 release for marko-database-readwrite).

The workflow file was effectively dead code anyway: subtree splits
force-push the package directory to refs/heads/main and refs/heads/develop
on every release, so the workflow file never survived on any working
split repo. Removing the PUT keeps only the settings PATCH (homepage,
has_projects), which works fine on empty repos. The actual repo content
lands via the split matrix's git push, which can bootstrap an empty repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@markshust markshust merged commit 4ff98fb into develop May 26, 2026
1 check passed
@github-actions github-actions Bot added the bug Something isn't working label May 26, 2026
@markshust markshust deleted the feature/split-repo-config-empty-repo-fix branch May 26, 2026 20:57
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