fix(upstream): validate issue number shape before Number() constructor in parseGitHubIssueUrl#1720
Conversation
…r in parseGitHubIssueUrl Add regex validation to parseGitHubIssueUrl in src/upstream/ruleset.ts to ensure the issue number consists only of digits before Number() conversion. This prevents partial parsing of malformed issue numbers like '123abc' which could lead to unexpected behavior. Fixes JSONbored#1719
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1720 +/- ##
=======================================
Coverage 95.58% 95.58%
=======================================
Files 204 204
Lines 22314 22315 +1
Branches 8066 8067 +1
=======================================
+ Hits 21329 21330 +1
Misses 408 408
Partials 577 577
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-06-29 12:39:50 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 4 non-blocking
Why this is blocked
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…nteger Export parseGitHubIssueUrl to allow proper test coverage and update the numeric validation to use Number.isSafeInteger instead of Number.isInteger for safer bounds checking. This addresses Gittensory feedback about test coverage and numeric validation. Addresses Gittensory review feedback on PR JSONbored#1720.
The previous refactor left a stray `export export function` which is a parse error and broke every Vitest suite. Reduce to a single `export`.
Add regex validation to parseGitHubIssueUrl in src/upstream/ruleset.ts to ensure the issue number consists only of digits before Number() conversion. This prevents partial parsing of malformed issue numbers like '123abc' which could lead to unexpected behavior.
Changes
Fixes #1719