Skip to content

fix(i18n): use artifact branch for translation dispatch#30

Merged
kilbot merged 2 commits intomainfrom
fix/translation-dispatch-payload-v2
Feb 2, 2026
Merged

fix(i18n): use artifact branch for translation dispatch#30
kilbot merged 2 commits intomainfrom
fix/translation-dispatch-payload-v2

Conversation

@kilbot
Copy link
Copy Markdown
Contributor

@kilbot kilbot commented Feb 2, 2026

Summary

  • Replaces base64-encoded payload dispatch with an orphan translations-source branch
  • Extracted JSON files are pushed to the branch, then a lightweight repository_dispatch notifies the translations repo with just repo_name and ref
  • Fixes the 65KB client_payload limit that caused the dispatch to fail

Test plan

  • Merge the translations repo PR first
  • Merge this, then trigger workflow_dispatch and verify the flow works end-to-end

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved translation update workflow by granting necessary permissions and adding a dedicated branch for extracted translations.
    • Added an automated step to publish extracted translation files to the translations-source branch when present.
    • Simplified the repository notification process to use a single dispatch call instead of per-file payload assembly.

The repository_dispatch client_payload has a ~65KB limit, and
core.json exceeds that when base64-encoded. Push extracted strings
to a translations-source orphan branch instead, and notify the
translations repo with just the repo name and ref.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

The GitHub Actions workflow .github/workflows/update-translations.yml now pushes extracted JSON translations to an orphan translations-source branch and replaces per-file base64 payload assembly with a single GitHub API dispatch that includes repo_name: "monorepo" and ref: "translations-source".

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
​.github/workflows/update-translations.yml
Added workflow permissions for write access; new step to create an orphan translations-source branch, copy JSON files from .translations, commit, and force-push; renamed a step to "Notify translations repo"; removed per-file base64 encoding and payload.json assembly; replaced multi-file dispatch with a single gh api dispatch using client_payload containing repo_name: "monorepo" and ref: "translations-source".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through CI at dawn's first light,
Pushed translations to a branch so bright.
One gentle dispatch, no tangled mess,
Clean commits, small steps, and less stress.
🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing base64-encoded payload dispatch with an orphan branch approach for translation dispatch, directly addressing the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/translation-dispatch-payload-v2

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

📊 Test Coverage Report

Package Statements Branches Functions Lines
@wcpos/core 🔴 36.6% 🔴 43.2% 🔴 42.1% 🔴 35.3%
@wcpos/components 🔴 44.9% 🟡 60.9% 🔴 24.2% 🔴 47.3%
@wcpos/database 🔴 33.2% 🔴 35.9% 🔴 40.3% 🔴 32.9%
@wcpos/hooks 🔴 45.4% 🔴 46.4% 🔴 44.8% 🔴 45.6%
@wcpos/utils 🔴 35.0% 🔴 0.0% 🔴 50.0% 🔴 33.3%
@wcpos/query 🟡 68.0% 🔴 52.6% 🟡 66.1% 🟡 68.0%
Average 🔴 43.8% 🔴 39.9% 🔴 44.6% 🔴 43.7%
Coverage Legend
  • 🟢 Good (≥80%)
  • 🟡 Moderate (60-79%)
  • 🔴 Needs improvement (<60%)
  • ⚪ No coverage data
--- 🤖 Updated by GitHub Actions • [View full report](https://github.com/wcpos/monorepo/actions/runs/21591532038)

Address CodeRabbit review feedback:
- Add explicit permissions: contents: write for git push
- Guard against empty .translations/ directory
- Use git add . instead of brittle git add *.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kilbot kilbot merged commit 9516ffe into main Feb 2, 2026
4 of 5 checks passed
@kilbot kilbot deleted the fix/translation-dispatch-payload-v2 branch February 2, 2026 13:22
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