Stop the reporter naming a path that no longer exists #2
BIN
__pycache__/report_job_log.cpython-313.pyc
Normal file
BIN
__pycache__/report_job_log.cpython-313.pyc
Normal file
Binary file not shown.
@@ -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
|
||||
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()`:
|
||||
|
||||
report_job_log.py /tmp/build.log
|
||||
@@ -143,7 +147,8 @@ def main(argv=None):
|
||||
sha = (os.environ.get("GITHUB_SHA") or "")[:8]
|
||||
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 "
|
||||
"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")
|
||||
|
||||
# A failure to report a failure must not itself be silent, but it also must
|
||||
|
||||
Reference in New Issue
Block a user