Stop the reporter naming a path that no longer exists #2

Merged
claude merged 1 commits from fix/reporter-self-reference into main 2026-09-07 12:44:27 +00:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit f9777ccbd2 - Show all commits

Binary file not shown.

View File

@@ -9,6 +9,10 @@ can be read, next to the change that caused it.
Standard library only, like `sync_blocked_label.py`, so it needs nothing but an Standard library only, like `sync_blocked_label.py`, so it needs nothing but an
interpreter. interpreter.
Lives in `weblib/weblib-ci` and is used by the other repos from there, so the
comment it posts must not name a path inside the repo it is reporting on --
there is no copy there to find.
Usage, from a workflow step guarded by `if: failure()`: Usage, from a workflow step guarded by `if: failure()`:
report_job_log.py /tmp/build.log report_job_log.py /tmp/build.log
@@ -143,7 +147,8 @@ def main(argv=None):
sha = (os.environ.get("GITHUB_SHA") or "")[:8] sha = (os.environ.get("GITHUB_SHA") or "")[:8]
body = (f"**`{args.job}` failed**{f' on `{sha}`' if sha else ''}.\n\n" body = (f"**`{args.job}` failed**{f' on `{sha}`' if sha else ''}.\n\n"
"Job logs return 500 on this Gitea, so here is the tail of the " "Job logs return 500 on this Gitea, so here is the tail of the "
"build output, posted by `tools/report_job_log.py`.\n\n" "build output, posted by [`report_job_log.py`]"
"(https://git.chaosbit.de/weblib/weblib-ci).\n\n"
f"{text}\n") f"{text}\n")
# A failure to report a failure must not itself be silent, but it also must # A failure to report a failure must not itself be silent, but it also must