Skip to content

feat(shared): manifest-driven sync script for shared configs#42

Merged
jr200 merged 1 commit into
masterfrom
feat/shared-sync-manifest
Apr 22, 2026
Merged

feat(shared): manifest-driven sync script for shared configs#42
jr200 merged 1 commit into
masterfrom
feat/shared-sync-manifest

Conversation

@jr200

@jr200 jr200 commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared/MANIFEST.json — declares which canonical configs consumer repos sync, split into two destination modes:
    • cache.shared/<file>, gitignored, re-fetched in CI
    • committed<file> at repo root, must be committed, drift-checked
  • Add shared/sync.sh — generalised, manifest-driven replacement for sync-shared-lint.sh. Adding new shared configs in future = edit manifest, no script change.
  • Add shared/release-please-config.json — canonical config; release-type stays a caller workflow input, so one config works for Python/Node/Go.

Motivation

Seven Python repos just adopted release-please (WG-86) with byte-identical release-please-config.json copy-pasted into each. As that count grows, keeping them in sync by hand drifts. Same pattern that sync-shared-lint.sh already solves for lint configs — extend it.

Rollout plan

  1. This PR merges → canonical lives in templates.
  2. Follow-up PR per consumer repo: swap pre-commit hook to sync.sh, delete in-repo release-please-config.json (becomes synced).
  3. sync-shared-lint.sh kept in place for now to avoid breaking existing consumers mid-migration; removed once all consumers are on sync.sh.

Test plan

  • Merge, then manually run curl -sfL https://raw.githubusercontent.com/jr200-labs/github-action-templates/master/shared/sync.sh | bash -s python in a scratch dir — verify it pulls both release-please-config.json and .shared/ruff.toml.
  • Confirm .shared/ gets added to .gitignore if missing.
  • First consumer-repo migration PR validates end-to-end.

Add shared/MANIFEST.json declaring which canonical configs consumer
repos should sync, split into two destination modes:
  - cache:     → .shared/<file>, gitignored, re-fetched in CI
  - committed: → <file> at repo root, must be committed, drift-checked

Add shared/sync.sh as the generalised replacement for sync-shared-lint.sh.
Driven by MANIFEST.json, so adding new shared configs in future requires
only a manifest edit, no script changes.

Add shared/release-please-config.json as the canonical release-please
config (common across all Python/Node/Go consumers — release-type is
supplied by the caller workflow's `with: release-type:` input, so the
config itself is language-agnostic).

sync-shared-lint.sh left in place for backwards compatibility; consumers
will be migrated to sync.sh during the release-please config rollout.
@jr200 jr200 merged commit 5d9c862 into master Apr 22, 2026
2 checks passed
@jr200 jr200 deleted the feat/shared-sync-manifest branch April 22, 2026 00:21
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