Skip to content

feat: include the failing command's cause in the error annotation - #26

Merged
atherdon merged 7 commits into
mainfrom
feat/surface-render-cause
Oct 13, 2026
Merged

atherdon merged 7 commits into
mainfrom
feat/surface-render-cause

Conversation

@atherdon

Copy link
Copy Markdown
Contributor

The action already printed "the script's own output is above". In the check summary that is not enough: a tsc failure (for example Cannot find module '../../../src/types.js') only showed up if you opened the full log.

Change

  • scripts/render.sh now captures the failed command's output.
  • It picks the first cause line (error TS..., Cannot find module, ERR_MODULE_NOT_FOUND, SyntaxError, TypeError, Error:).
  • That cause is appended to the ::error:: annotation, and the failure block reprints it plus the last 20 lines.

A failing npm run render:hackernoon that dies on a missing module now annotates:

::error::render failed for scripts/render.ts: scripts/samples/hackernoon/hackernoon-data.ts(1,42): error TS2307: Cannot find module '../../../src/types.js'

Test

  • New case in tests/render.test.sh asserts the annotation includes a tsc-style cause.
  • Existing render tests still pass. The six command-mode failures also fail on main.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Rendered emails

This PR rendered email templates.

Open the run → Artifacts → download → open index.html.

…indows

The previous node -e interpolated $PROJ (Git Bash path) into a string that Node treats as a Windows path, producing ENOENT on package.json. cd into the project and use a relative path instead, matching the existing validate-email deletion case.
The index.html writer escapes &, <, > so the tests must look for a&b.html and a<b>.html, not the raw characters.
The index.html writer escapes special characters, so the tests must look for the escaped forms.
@atherdon
atherdon merged commit 1c3e658 into main Oct 13, 2026
18 checks passed
@atherdon
atherdon deleted the feat/surface-render-cause branch October 13, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant