Skip to content

Commit 0c25c39

Browse files
DanWahlinCopilot
andcommitted
fix translated agents file polishing
Allow translated Markdown files named AGENTS.md through the Translation Polisher safe output guard, require add-labels to target the PR, and forbid incorrect PR-body marker variants. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2c7b2e9 commit 0c25c39

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/translation-polisher.lock.yml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/translation-polisher.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ safe-outputs:
4646
push-to-pull-request-branch:
4747
target: "*"
4848
labels: [translation, automated-pr]
49+
protected-files: allowed
4950
allowed-files:
5051
- "translations/**/*.md"
5152
if-no-changes: "ignore"
@@ -135,10 +136,10 @@ Emit each safe output type at most once:
135136

136137
- At most one `push_to_pull_request_branch`.
137138
- At most one `update_pull_request`.
138-
- At most one `add_labels`.
139+
- At most one `add_labels`, and only when the `translation-polished` label is not already present on the pull request.
139140
- At most one `add_comment`.
140141

141-
Do not emit duplicate label or comment requests. If a label is already present, do not emit an `add_labels` request for it. If you need to report both a quality summary and polishing summary, combine them into the single allowed pull request comment.
142+
Do not emit duplicate label or comment requests. If a label is already present, do not emit an `add_labels` request for it. If you emit `add_labels`, include the target pull request number as `item_number`. If you need to report both a quality summary and polishing summary, combine them into the single allowed pull request comment.
142143

143144
## Quality checklist
144145

@@ -233,6 +234,8 @@ The body must include exactly one managed block and exactly one section inside t
233234

234235
If an older unmarked `## Translation Quality Review` section already exists, replace it with the marked block. Do not append duplicates. Do not change the marker casing. Do not place generated workflow footers, integrity notes, or unrelated comments inside the managed block.
235236

237+
Do not use any other marker names or casing. In particular, never use `TRANSLATION-REVIEW-START`, `TRANSLATION-REVIEW-END`, `TRANSLATION-QUALITY-REVIEW-START`, or uppercase marker variants.
238+
236239
Use this format:
237240

238241
```markdown

0 commit comments

Comments
 (0)