Fix three defects of the English-comments check found in the trial (task 8) #212

Merged
Tirsvad merged 3 commits from mil-013-judge-each-line into main 2026-10-21 05:47:53 +02:00
3 Commits
Author SHA1 Message Date
Tirsvad 39bcaa5bac Link the run by its id in the comment on the pull request
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 1m2s
The trial showed that the web address of a run on the instance holds the id of
the run, not its number, so the link in the comment pointed to another run.

Refs #201
Refs #204
Task: MIL-013#5
2026-10-21 10:29:20 +08:00
Tirsvad 3d46c4b60a Tell the author in a called workflow: ask for the pull request, not the event
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 1m2s
The trial on the instance showed that gitea.event_name is workflow_call inside
a called workflow, so the step that comments on the pull request was skipped.
The pull request number, its author and the base ref are available there, and
the step now runs when the number is set.

Refs #201
Refs #204
Task: MIL-013#5
2026-10-21 10:26:13 +08:00
Tirsvad 198830588c Judge each line of a comment block, then the block
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 1m0s
The trial of the English-comments check found that a Danish comment line next
to an English one was missed: the joined block counted as English. A block of
several lines is now judged line by line first (at least four words and a
probability of 0.7), and as a whole when no line is flagged. Found and fixed
while preparing MIL-013 task 8; the guide, the wiki and ADR-0012 say so.

Refs #200
Refs #204
Task: MIL-013#4
Task: MIL-013#10
2026-10-21 10:18:30 +08:00