chore(n): add setup-repos to clone + build managed plugins#183
Draft
adekbadek wants to merge 1 commit into
Draft
chore(n): add setup-repos to clone + build managed plugins#183adekbadek wants to merge 1 commit into
adekbadek wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an n setup-repos bootstrap command to standardize cloning and wiring up the two private “managed” plugins (newspack-manager, newspack-manager-admin) into the workspace repos/plugins/ convention, including isolated env support.
Changes:
- Add
n setup-repos [--env <name>]to clone managed plugins on the host (viagh), then build + symlink them inside the target container. - Introduce
bin/setup-repos.shand amanaged_pluginslist inbin/repos.shto drive the bootstrap flow. - Mount
./reposinto isolated env containers (/newspack-repos) and document the workflow inAGENTS.md.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
n |
Adds setup-repos command wiring (clone on host, build/link in container) and updates help output. |
bin/setup-repos.sh |
New host-side script to clone the private managed plugin repos into repos/plugins/. |
bin/repos.sh |
Adds a managed_plugins array used by n setup-repos/setup-repos.sh. |
bin/env.sh |
Adds the ./repos:/newspack-repos mount to isolated environment compose generation. |
AGENTS.md |
Documents n setup-repos in first-time setup and the repos/ convention. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4179132 to
5bc0cfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Adds a thin bootstrapper so a fresh checkout can pull in the two plugins that can't live in this monorepo because they're in separate private repos:
newspack-managerandnewspack-manager-admin. Previously these had to be cloned by hand, with no convention.n setup-reposclones both intorepos/plugins/via the GitHub CLI (so its auth covers the private repos), skipping any that are already present, then builds each through the existing standalone-repo path (the same onen build <name>uses) and symlinks them into the running site vialink-repos.sh. They show up in the plugins list ready to activate, no restart needed. Pass--env <name>to build and link into an isolated environment instead of the main site.This builds on the existing
repos/{plugins,themes}convention, the./repos:/newspack-reposmount, andlink-repos.shsymlinking (#177/#178). It also adds the./reposmount to the isolated-env compose template, which was the one place that mount was missing, so therepos/convention now works in isolated envs too.How to test the changes in this Pull Request:
gh auth status).n startandn install(or use an existing running site).n setup-repos. Confirm it clonesnewspack-managerandnewspack-manager-adminintorepos/plugins/, builds each, and symlinks both intowp-content/plugins/.wp plugin list), confirm both plugins appear and activate with no fatals (withnewspack-pluginactive). Confirm the homepage still loads.n setup-reposagain and confirm it reports both as already present and skips the clone (idempotent).n env create managed-test --up, thenn setup-repos --env managed-test. Confirm the env container mounts/newspack-repos, both plugins symlink into the env'swp-content/plugins/, and activate with no fatals. Tear down withn env destroy managed-test.n setup-reposwithoutghinstalled/authenticated and confirm it fails fast with a clear error before attempting any build.Other information: