You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/18 03:51:40 UTC
[PR] fix: clear the type-check hints, and let the check fail on errors again [magpie-site]
potiuk opened a new pull request, #193:
URL: https://github.com/apache/magpie-site/pull/193
`npx astro check` reported **9 hints**. All of them were real, and the tree is
now at 0 errors / 0 warnings / 0 hints.
| Hint | Fix |
|---|---|
| `publish.mjs` ×3 — `'pr' is declared but never read` | Removed the parameter from `waitingBody`, `refusedBody`, `armedBody` and updated the call sites |
| `content.config.ts` ×4 — `'z' is deprecated` | `astro:content` no longer re-exports `z`; it comes from `astro/zod` |
| `JsonLd.astro` — script treated as `is:inline` | Said so explicitly, which is what already happens |
| `review.js` — `Could not find name 'captionFor'` | A `.d.ts` declaring the three helpers the publisher supplies as globals |
## Two worth explaining
**The unused `pr` parameters.** A parameter that is never read lies about what
a function needs. Removing them surfaced something: my first pass updated only
one of four `refusedBody` call sites, so three kept passing the PR number as
the first argument — where it silently became the *refusal reason* printed to
the contributor. The test suite caught it immediately. Good argument for
removing the parameter rather than renaming it `_pr`.
**`review.js` is browser script, not a module.** The publisher concatenates
`logic.mjs` ahead of it with the `export` keywords stripped, so `clampRegion`,
`captionFor` and `targetUrl` arrive as globals. TypeScript had no way to know
that. The `.d.ts` both clears the hint and writes down a contract that was
previously implied by a `String.replace` in the publisher — if someone renames
one of those functions, the declaration is now the thing that disagrees.
## The check can fail the build again
The step carried `continue-on-error: true`, so even genuine type **errors**
could not fail CI. With the tree clean, that only served to hide the next
regression, so it is gone.
This is narrower than it sounds: `astro check` fails a step on **errors only** —
warnings and hints still print without blocking. That matters here because the
site builds 159 markdown files synced from `apache/magpie` at build time, and a
doc acquiring a hint must not be able to break this repo's CI.
Verified: 110/110 tests, `prek` + zizmor clean, `npm run build` produces 163
pages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clear the type-check hints, and let the check fail on errors again [magpie-site]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #193:
URL: https://github.com/apache/magpie-site/pull/193
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clear the type-check hints, and let the check fail on errors again [magpie-site]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #193:
URL: https://github.com/apache/magpie-site/pull/193#issuecomment-5724976533
### Preview this pull request
A committer can publish a live preview of this PR by commenting `/show-preview` on its own line. It will appear at https://magpie-pr193.staged.apache.org/ and then track this PR's head commit until it closes.
Staging takes a few minutes to pick up each push.
<!-- magpie-preview-howto -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org