Skip to content

feat: /translate PR comment command + exclude root QMD from format check - #257

Merged
ShixiangWang merged 2 commits into
mainfrom
copilot/activate-auto-translate-on-pr
Mar 20, 2026
Merged

feat: /translate PR comment command + exclude root QMD from format check#257
ShixiangWang merged 2 commits into
mainfrom
copilot/activate-auto-translate-on-pr

Conversation

Copilot AI commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Two workflow improvements: the auto-translate workflow was only triggerable manually or on push/PR open; root-level site navigation QMDs (index.qmd, About.qmd, etc.) were incorrectly flagged by the tutorial format checker.

/translate PR comment command (translate-command.yml — new)

Split the comment-command handling into a dedicated zero-checkout gatekeeper workflow to avoid the issue_comment + untrusted-code-checkout security pattern (CodeQL actions/untrusted-checkout-toctou).

/translate                          # translate all changed QMD files in the PR
/translate Omics/VolcanoPlot.qmd    # target a specific file
/translate File1.qmd File2.qmd      # target multiple files
  • Only write/maintain/admin collaborators can trigger; non-collaborators get an error comment + 👎
  • Reacts with 👀 on receipt; posts acknowledgement comment with link to workflow runs
  • Dispatches auto-translate.yml via workflow_dispatch with pr_number + optional files inputs — no checkout, no code execution in this workflow

auto-translate.yml — updated

  • Removed issue_comment trigger (now owned by translate-command.yml)
  • Added files workflow_dispatch input for file-level targeting (used by the command handler or direct manual dispatch)
  • PR translation-summary comment now also fires when dispatched via workflow_dispatch with a pr_number

pr-review.yml — format check scope fix

Added f.filename.includes('/') to the QMD filter so root-level files are excluded from tutorial format validation.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com>
Copilot AI changed the title [WIP] Add directive to activate auto-translate on PRs feat: /translate PR comment command + exclude root QMD from format check Mar 20, 2026
Copilot AI requested a review from ShixiangWang March 20, 2026 07:59
@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

No new QMD tutorial files to check.

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@ShixiangWang
ShixiangWang marked this pull request as ready for review March 20, 2026 09:26
@ShixiangWang
ShixiangWang merged commit 7321ce2 into main Mar 20, 2026
2 checks passed
@ShixiangWang
ShixiangWang deleted the copilot/activate-auto-translate-on-pr branch March 20, 2026 09:27
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