fix warnings#342
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| async (_label, payload) => { | ||
| const result = await wakatimeApi({ username: payload }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| [param]: payload, | ||
| }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| async (_label, payload) => { | ||
| const result = await gistApi({ id: payload }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| [param]: payload, | ||
| }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| async (_label, payload) => { | ||
| const result = await pinApi({ repo: payload }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| async (_label, payload) => { | ||
| const result = await topLangsApi({ username: payload }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| [param]: payload, | ||
| }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| async (_label, payload) => { | ||
| const result = await statsApi({ username: payload }); | ||
|
|
||
| document.body.innerHTML = result.content; |
| [param]: payload, | ||
| }); | ||
|
|
||
| document.body.innerHTML = result.content; |
Member
Author
|
The errors currently reported by the "Backend E2E test" pipeline are expected and not a problem. Mainly we encode As far as I can tell, all the CodeQL problems reported here are false positives. They complain about color inputs, but we verify them via |
marcalexiei
reviewed
Jul 11, 2026
marcalexiei
left a comment
There was a problem hiding this comment.
I've opened #355 with a few follow-up refinements to the color validation
- Related to #342 ## fix(top-languages): default color when a language has no color GitHub's `Language.color` is nullable, so a language can reach the card with `color: null`. The `compact`, `pie`, `donut`, and `donut-vertical` layouts validated the raw color and threw on `null`, turning a normal request into a "Something went wrong" error card (previously such languages rendered gray). ## refactor(core): restructure color validation Cleans up `common/color.ts` (no behavior change for valid inputs): - Split the `isValidHexColor(x, numberSignPrefix)` into `isBareHexColor` / `isPrefixedHexColor`. - Moved the hex regex to a module constant (was rebuilt on every call in render loops). - Gradient angle now validated with `Number.isFinite` (rejects `Infinity`) - Reworked `color.test.ts` for the two predicates + non-finite-angle cases.
martin-mfg
pushed a commit
that referenced
this pull request
Jul 12, 2026
…tern (#356) - Related to #342 `stats` and `pin` already reject `username`/`repo`/`owner` that don't match `safePattern` (`/^[-\w/.,]+$/`), but `top-langs`, `wakatime`, and `gist` didn't. This applies the same guard: - `top-langs` + `wakatime`: reject a `username` containing unsafe characters. Matters most for `wakatime`, where `username` is interpolated into the outbound request URL path. - `gist`: same guard on its `id` param. All three return the existing `error - permanent` card before any fetch. ## Additional change Simplified the `layout` / `stats_format` checks in `top-langs`: dropped the redundant `typeof x !== "string" ||` (a non-string already fails `.includes(...)`), keeping the `x !== undefined` guard so the params stay optional.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.