Skip to content

Conversation

@mattapperson
Copy link
Collaborator

🔄 Automated Monorepo Sync

This PR adds a workflow that automatically notifies the openrouter-web monorepo when changes are pushed to main in this repository.

How It Works

typescript-sdk (this repo)          openrouter-web (monorepo)
├─ Commit pushed to main            ├─ Receives repository_dispatch
├─ notify-monorepo.yaml triggers    ├─ Syncs typescript subtree
├─ Sends webhook event ────────────>├─ Creates PR with changes
                                     └─ Auto-merges if CI passes

What's Added

File: .github/workflows/notify-monorepo.yaml

Trigger: Runs automatically on every push to main

Action: Sends a repository_dispatch event to the monorepo to trigger subtree sync

Setup Required

After merging this PR, an admin needs to add a secret:

  1. Go to Settings → Secrets and variables → Actions
  2. Click New repository secret
  3. Name: MONOREPO_SYNC_TOKEN
  4. Value: GitHub Personal Access Token with repo scope
  5. Click Add secret

The token allows this repo to trigger workflows in the monorepo.

Benefits

  • ✅ Automatic sync of changes to monorepo
  • ✅ Changes reviewed via PR before merging to monorepo
  • ✅ No manual intervention needed
  • ✅ Fast propagation of fixes and features

Testing

After setup is complete:

  1. Push a commit to main in this repo
  2. Check Actions tab - "Notify Monorepo of Changes" should run
  3. Check openrouter-web Actions - "Sync Subtrees" should trigger
  4. A PR should be created in openrouter-web with the changes

Related: OpenRouterTeam/openrouter-web#9617

Automatically notifies openrouter-web monorepo when changes are pushed to main.
This triggers the subtree sync workflow to create a PR with updates.

Requires MONOREPO_SYNC_TOKEN secret to be configured.
@mattapperson mattapperson merged commit 93c2823 into main Nov 15, 2025
3 checks passed
@mattapperson mattapperson deleted the feat/add-monorepo-sync-notification branch November 15, 2025 21:16
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.

2 participants