ci: notify customer-portal when search-ui is published#51
Conversation
After the npm publish step, fire a repository_dispatch to magicpages/customer-portal carrying the new search-ui version. The portal listens for it and opens a PR bumping its @magicpages/ghost-typesense-search-ui pin within seconds of the release, instead of waiting for its weekly Dependabot run. Best-effort and non-fatal: a missing token or API error won't fail an otherwise-successful release (continue-on-error + an explicit skip when the token is unset). Requires a CUSTOMER_PORTAL_DISPATCH_TOKEN secret — a fine-grained PAT with "Contents: write" on the customer-portal repo, since GITHUB_TOKEN is scoped to this repository only.
Reviewer's GuideAdds a best-effort GitHub Actions step to the release workflow that, after publishing, sends a repository_dispatch event with the new search-ui package version to the customer-portal repo so it can auto-open a bump PR. Sequence diagram for GitHub Actions dispatch to customer-portal on search-ui releasesequenceDiagram
actor Developer
participant search_ui_repo as search-ui_repo
participant release_workflow as release.yml_publish_job
participant github_api as GitHub_API
participant customer_portal as customer-portal_repo
Developer->>search_ui_repo: Merge release changes
search_ui_repo->>release_workflow: Trigger release workflow
release_workflow->>release_workflow: npm publish packages
release_workflow->>release_workflow: Check CUSTOMER_PORTAL_DISPATCH_TOKEN
alt token missing
release_workflow-->>release_workflow: Log warning and skip dispatch
else token present
release_workflow->>github_api: gh api POST repos/magicpages/customer-portal/dispatches
github_api-->>customer_portal: repository_dispatch ghost-typesense-search-ui-released
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
More reviews will be available in 41 minutes and 48 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Summary
After the npm publish step in
release.yml, fire arepository_dispatchtomagicpages/customer-portalcarrying the new@magicpages/ghost-typesense-search-uiversion. The portal listens for it (customer-portal#2247) and opens a PR bumping its pin within seconds of the release — instead of waiting up to a week for its Dependabot run.Behaviour
continue-on-error: trueplus an explicit skip-with-warning when the token is unset. A dispatch failure never fails an otherwise-successful release (the publish already happened).packages/search-ui/package.json), built as JSON vianode -pand piped togh api --input -(no shell interpolation of the value).Required setup
Add a repo secret
CUSTOMER_PORTAL_DISPATCH_TOKEN— a fine-grained PAT with Contents: write onmagicpages/customer-portal(theGITHUB_TOKENhere is scoped to this repo only and can't dispatch cross-repo). Until it's set, the step logs a warning and skips; releases still publish normally and the portal's weekly Dependabot net covers the gap.Test plan
release.ymlparses; dispatch is the final publish-job stepSummary by Sourcery
CI: