ENH: add review-translations workflow for action-translation - #212
Merged
Conversation
Adds the reviewer workflow that runs on translation PRs (labeled 'action-translation') opened by the sync workflow in the source repo (lecture-python-intro). Uses QuantEcon/action-translation@v0.14.1 in review mode.
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to automatically run QuantEcon/action-translation in review mode on incoming translation PRs produced by action-translation, validating zh-cn translations against the lecture-python-intro English source.
Changes:
- Introduces
.github/workflows/review-translations.ymlto run translation review on PR events when the PR has theaction-translationlabel. - Checks out the PR and runs
QuantEcon/action-translation@v0.14.1with the configured source/target language settings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback: - Add labeled/reopened to PR trigger types - Add permissions block (least-privilege) - Add concurrency group to avoid duplicate LLM calls
11 tasks
- action-translation: v0.14.1 -> v0. The v0 tag floats to the latest 0.x release (currently v0.17.0), so the review workflow picks up new releases without a version bump PR each time. All inputs used here (mode, source-repo, source-language, target-language, docs-folder, anthropic-api-key, github-token) are unchanged at v0. - checkout: v4 -> v7, matching the rest of the workflows on main after #220. Verified both refs resolve and the workflow YAML parses.
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Review: job-level concurrency + labeled-event filter (the fleet fix from lecture-python-programming.fr#7, refined in action-translation v0.17.0 templates) — the previous workflow-level cancel-in-progress could leave a sync PR with no review when a trailing labeled event cancelled the real run. Rebase: standard target-repo workflow from action-translation examples/, required for multi-PR sync waves (see QuantEcon/action-translation#63). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
review-translations.ymlworkflow to enable automatic translation review on PRs created byaction-translation.How it works
The source repo (
lecture-python-intro) runs async-translations-zh-cn.ymlworkflow on merged PRs that touchlectures/**/*.mdorlectures/_toc.yml. It translates changed content and opens a PR in this repo with theaction-translationlabel.This reviewer workflow triggers on PRs labeled
action-translation, runningQuantEcon/action-translation@v0.14.1inreviewmode to validate the translation quality.Setup based on
lecture-python-programming(source sync workflow)lecture-python-programming.zh-cn(target review workflow)Required secrets
ANTHROPIC_API_KEY— for LLM-based translation reviewGITHUB_TOKEN— automatically providedRelated