Skip to content

Fix TypeScript errors in helmetData tests; run CI on push to all branches#265

Merged
staylor merged 3 commits intov3.0.0from
copilot/sub-pr-260-one-more-time
Mar 3, 2026
Merged

Fix TypeScript errors in helmetData tests; run CI on push to all branches#265
staylor merged 3 commits intov3.0.0from
copilot/sub-pr-260-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

Making HelmetDataContext.helmet nullable (from a prior fix) caused TypeScript TS18047 "possibly null" errors in the server-side helmetData tests, and CI was only configured to run on pushes/PRs targeting main.

Changes

  • __tests__/server/helmetData.test.tsx — Add non-null assertions (!) to the three helmetData.context.helmet accesses in server tests. The value is always populated after rendering in these test cases; the assertion satisfies TypeScript without altering runtime behavior.
  • .github/workflows/ci.yml — Remove branches: [main] restriction and the pull_request trigger so CI runs on every push to any branch (avoids duplicate runs on PRs).

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: staylor <52932+staylor@users.noreply.github.com>
Copilot AI changed the title [WIP] Update for React 19 support and TypeScript cleanup Fix TypeScript errors in helmetData tests; run CI on all branches Mar 3, 2026
on:
push:
branches: [main]
pull_request:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I think we can just run on push, getting duplicate runs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4027486 — removed the pull_request trigger, keeping only push.

Co-authored-by: staylor <52932+staylor@users.noreply.github.com>
@staylor staylor marked this pull request as ready for review March 3, 2026 12:07
Copilot AI changed the title Fix TypeScript errors in helmetData tests; run CI on all branches Fix TypeScript errors in helmetData tests; run CI on push to all branches Mar 3, 2026
@staylor staylor merged commit 3ce16de into v3.0.0 Mar 3, 2026
4 checks passed
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.

2 participants