Skip to content

Add monorepo-mirror Action (subtree-split code.pyret.org from pyret-lang)#632

Merged
jpolitz merged 2 commits into
horizonfrom
add-monorepo-mirror-action
Jun 25, 2026
Merged

Add monorepo-mirror Action (subtree-split code.pyret.org from pyret-lang)#632
jpolitz merged 2 commits into
horizonfrom
add-monorepo-mirror-action

Conversation

@jpolitz

@jpolitz jpolitz commented Jun 25, 2026

Copy link
Copy Markdown
Member

Joe says:

I'm going to close this. OK this can actually work.

I want to support pyret.bootstrapworld.org cleanly. The way I came up with to do this is have a “monorepo mirror” branch on this repo. We can leave this read-only with an archive-ish README, etc, but still make it be easy for upstream things like PBO to pull and deploy to Heroku.

But since we're starting to make monorepo-assuming changes to the build eventually, this will probably break in the long run.

Sets up the read-only generated mirror approach for the monorepo transition.

What this adds

A manual GitHub Action (.github/workflows/monorepo-mirror.yml) that:

  1. Checks out brownplt/pyret-lang at a chosen ref (default mainmast) with full history.
  2. Runs git subtree split --prefix=code.pyret.org to extract the subfolder with history preserved (original authors intact).
  3. Force-pushes the result to a new monorepo-mirror branch of this repo.

Why

Once code.pyret.org lives in the monorepo, downstream forks (Bootstrap) lose the "pull from upstream → push to fork → click Deploy in Heroku" workflow, because the deployable tree is no longer at a repo root. This branch keeps a flat, root-level, deployable mirror that those forks can track — eventually with no change to their URL/workflow.

Notes

  • Manual-only (workflow_dispatch) for now — pick the source ref when running. A daily schedule is included but commented out.
  • Pushes via the built-in GITHUB_TOKEN (same repo), so no new secret/PAT/deploy key is needed.
  • The monorepo-mirror branch is created on the first successful run; nothing existing is touched.
  • This is staging: the branch name is intentionally monorepo-mirror (not a downstream's tracked branch) so we can watch it populate with zero risk before re-pointing anything.

🤖 Generated with Claude Code

Generates a flat, history-preserving mirror of the code.pyret.org/ subfolder
of the brownplt/pyret-lang monorepo onto a new `monorepo-mirror` branch of
this repo, so downstream forks (e.g. Bootstrap) can keep their
pull/push/Deploy workflow once code.pyret.org moves into the monorepo.

Manual-only (workflow_dispatch) to start; pushes via the built-in
GITHUB_TOKEN, so no new secret is required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jpolitz jpolitz closed this Jun 25, 2026
- Default source ref mainmast -> drydock (mainmast held for team review).
- Extract via `git filter-repo` (~1s) instead of `git subtree split`, which
  re-walks all ~12k monorepo commits and takes ~an hour for the same result.
- After extraction, copy the shared codemirror-mode sibling in as a real
  `mode/` dir (force-added past .gitignore) so the mirror is a self-contained,
  Heroku-deployable slice -- matching the horizon deploy's slice fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jpolitz jpolitz reopened this Jun 25, 2026
@jpolitz jpolitz merged commit dd1f375 into horizon Jun 25, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Jun 25, 2026
The sync pulled in this workflow because it now lives on brownplt/code.pyret.org
@horizon (PR #632). It belongs to the standalone code.pyret.org repo -- it runs
there, pushing to that repo's monorepo-mirror branch with that repo's
GITHUB_TOKEN. Nested under the monorepo's code.pyret.org/ it would never run and
just adds confusion, so keep it out of the monorepo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant