fix(github): allow @ in release tag validation#233
Conversation
npm-style aqua packages such as biome use GitHub release tags like @biomejs/biome@2.4.16. validReleaseTag rejected @ and returned 400 before the mirror could fetch from GitHub.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughExpand GitHub release tag validation to support ChangesRelease tag validation with @ support
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
Greptile SummaryThis PR fixes a 400 Bad Request error returned by the mise-versions GitHub release mirror when the release tag contains
Confidence Score: 5/5Safe to merge — the change is a one-character regex addition with no effect on existing validated tags. The diff is minimal: one character added to an allowlist regex and a new test file. The No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "test(github): read validation script fro..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates GitHub mirror validation to accept npm-style scoped release tags (e.g., @scope/pkg@version) and adds tests to prevent regressions.
Changes:
- Allow
@invalidReleaseTagvalidation regex. - Add a Node-based test suite that validates accepted and rejected release tag patterns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/src/lib/github/mirror.ts | Expands release-tag validation to support @-prefixed npm-style tags. |
| scripts/github-mirror-validation.test.js | Adds automated tests covering valid/invalid release tag inputs (including scoped npm tags). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pass `-` to the node subprocess so stdin execution is unambiguous.
Problem
Registry-backed aqua tools such as biome use npm-style GitHub release tags defined in the aqua registry via
version_prefix, e.g.@biomejs/biome@2.4.16. These tags are valid on GitHub and are what mise's aqua backend requests when installing a version.Since jdx/mise#10341, mise routes GitHub release metadata for registry tools through mise-versions first. For biome this produces a spurious warning on every install:
The install still succeeds because mise falls back to the GitHub API directly, but the versions-host cache is never used and users see noisy warnings.
Root cause:
validReleaseTaginweb/src/lib/github/mirror.tsonly allowed[A-Za-z0-9_.\/:+-]. The@character is not in that set, so the API handler rejects the request with 400 before attempting to mirror the release.The same issue affects other aqua packages with npm-style prefixes, including
@moonrepo/cli@…and@yarnpkg/cli/….Fix
Allow
@invalidReleaseTag. Add unit tests covering biome-style tags and existing common tag formats.Test plan
aube run test:js(includes newscripts/github-mirror-validation.test.js)Made with Cursor
Summary by CodeRabbit
Bug Fixes
@character for scoped package names.Tests