Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Each host is its own release-please package (`dist/<host>`), with its own versio

### Mirror repos

Some installs name a repo of their own instead of a folder here: `copilot plugin marketplace add ZenRows/copilot-zenrows` reads that repo's root. Such a repo is a mirror: `mirror: ZenRows/copilot-zenrows` in the host's `vars.yaml` makes each release of the host replace the mirror's contents with `dist/<host>/`, plus the host's marketplace catalogs at the same paths, listing only that host with `source` set to `./` (the mirror's root), and a banner in its README pointing here. So the catalog is edited in one place, and `npm run validate` fails if a mirrored host has none. Nobody edits a mirror by hand; only its deploy key can push to it.
Some installs name a repo of their own instead of a folder here: `copilot plugin marketplace add ZenRows/copilot-zenrows` reads that repo's root, and so do the Cursor Marketplace and ClawHub. Such a repo is a mirror: `mirror: ZenRows/copilot-zenrows` in the host's `vars.yaml` makes each release of the host replace the mirror's contents with `dist/<host>/`, plus a banner in its README pointing here. If the host has marketplace catalogs, the mirror gets them at the same paths, listing only that host with `source` set to `./` (the mirror's root), so the catalog is edited in one place. A host that reads its plugin from the repo root, like Cursor or OpenClaw, needs no catalog. Nobody edits a mirror by hand; only its deploy key can push to it.

- The release workflow runs `.github/workflows/mirror.yml` for each released host. It makes one normal commit (`release copilot-v0.1.2 from ZenRows/zenrows-integrations@<sha>`), never a force-push, and tags the mirror `v<version>`. No commit is made when nothing changed, so a re-run is safe.
- It pushes with the deploy key in the `MIRROR_KEY_<HOST>` secret of the `release` environment. The key, the mirror's branch protection and its settings are in [iac-bootstrap](https://github.com/ZenRows/iac-bootstrap).
Expand Down
6 changes: 3 additions & 3 deletions scripts/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ export function catalogs() {
}

// A host with mirror: <owner/repo> in vars.yaml is also published to that repo,
// whose root is dist/<host>/ plus the host's marketplace catalogs (see
// catalogs()) at the same paths, listing only this host with source "./" (the
// mirror's root), and a banner under README.md's title pointing back here.
// whose root is dist/<host>/ plus the host's marketplace catalogs, if it has
// any (see catalogs()), at the same paths, listing only this host with source
// "./" (the mirror's root), and a banner under README.md's title pointing back here.
// The banner names the release tag, or for a sync with no tag, the commit.
// Reads the committed files, which render --check and validate keep current.
// Returns Map<path, Buffer>.
Expand Down
11 changes: 2 additions & 9 deletions scripts/validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,8 @@ for (const host of hosts()) {
}
}

// A mirror repo installs through the host's marketplace catalog, rewritten
// to point at the mirror's root, so a mirrored host needs one.
if (values.mirror !== undefined) {
if (!/^[\w.-]+\/[\w.-]+$/.test(String(values.mirror))) {
errors.push(`${host}: vars.yaml mirror: is "${values.mirror}", expected <owner>/<repo>`);
}
if (!catalogs().some((c) => c.host === host)) {
errors.push(`${host}: vars.yaml sets mirror:, but ${host} has no marketplace catalog for the mirror to carry (see CONTRIBUTING.md)`);
}
if (values.mirror !== undefined && !/^[\w.-]+\/[\w.-]+$/.test(String(values.mirror))) {
errors.push(`${host}: vars.yaml mirror: is "${values.mirror}", expected <owner>/<repo>`);
}

// A whole-file override stops receiving fixes to the shared file it copied.
Expand Down
Loading