Skip to content

ci(final-check): neutralise mentions and references before the bot posts - #383

Merged
Seungpyo1007 merged 1 commit into
developfrom
ci/final-check-sanitize
Nov 1, 2026
Merged

Seungpyo1007 merged 1 commit into
developfrom
ci/final-check-sanitize

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

What

  • Comment job: final-check.yml's comment job now cleans the report before TechEngineBot posts it:
    • Every @ is dropped.
    • #123, GH-123 and /issues/N, /pull/N and /discussions/N links are broken with a zero-width space.
    • The body is capped at 65,000 characters, under GitHub's comment limit.
  • Token wording: it no longer says "for this repository only". One fine-grained TechEngineBot token, with Pull requests: read and write, covers the five GetTechAPI repos that now have a final check.
  • README: one sentence on the above.

Why

The check job runs the PR's code. On a GitHub-hosted runner, that code can rewrite anything later in the job, the report included, and until now only the check job cleaned it. The comment job runs none of the PR's code, so cleaning there means the bot can't be used to mention people or cross-reference issues, whatever a PR contains.

The same lines are going into the other repos' final checks: GetTechAPI/TechEngine#128, GetTechAPI/TechMachine#8, GetTechAPI/game-catalog#2 and GetTechAPI/cpu-engineering-samples#37.

Checks

I ran the script, extracted from the YAML, in node against stubs:

  • A normal report, with the marker, the run link and Mermaid colours, is posted unchanged.
  • @user, #12, GetTechAPI/TechEngine#127, GH-7 and an issue URL are neutralised.
  • A report without the marker posts nothing.
  • A 70,000-character body is cut to 65,000.
  • Re-running against an identical existing comment writes nothing.

Closes #297

@Seungpyo1007 Seungpyo1007 added documentation Improvements or additions to documentation enhancement New feature or request ci CI and workflow changes labels Nov 1, 2026
The check job runs the PR's code, which on a GitHub-hosted runner can
rewrite anything later in that job, the report included. Until now only
the check job cleaned that report. The comment job now cleans it too
before TechEngineBot posts it:
- every @ is dropped
- #123, GH-123 and issue, PR and discussion links are broken
- the body is capped at 65,000 characters
So whatever a PR contains, the bot can't be made to mention anyone or
cross-reference anything.

The token text no longer says "for this repository only". One
fine-grained TechEngineBot token now covers every GetTechAPI repo that
has a final check.

Refs #297
@Seungpyo1007
Seungpyo1007 force-pushed the ci/final-check-sanitize branch from 75ea1c5 to 10660cb Compare November 1, 2026 17:03
@Seungpyo1007
Seungpyo1007 merged commit 300567d into develop Nov 1, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the ci/final-check-sanitize branch November 1, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI and workflow changes documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine, TechEngineBot and automation (workstream)

2 participants