Repository navigation
feat(registry): select releases by a tag prefix - #135
Merged
Merged
Conversation
3 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
A repository can declare `tag-prefix` (e.g. `bun-`): releases whose tag does not start with it are ignored, and the prefix is cut off before the version is parsed. An explicit prefix instead of a lenient version parser keeps a release-please monorepo from mixing components, where `cli-v2.0.0` and `sdk-v1.4.0` would otherwise be taken as versions of one tool. Releases now expose the original tag through `getTag()`, so forgetting a deleted release in the version registry no longer reconstructs the tag from the version. Assisted-By: Claude Opus 5.5
roxblnfk
force-pushed
the
feat/tag-prefix
branch
from
October 5, 2026 12:22
5269834 to
ee246ba
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
GitLab asset downloads still use the display name instead of the newly preserved tag, causing releases with differing names and tags to fail.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds explicit release-tag prefix filtering so monorepo components such as Bun can be selected without weakening version parsing.
Changes:
- Adds
tag-prefixconfiguration for GitHub and GitLab repositories. - Preserves original tags for registry operations and adds Bun to the default registry.
- Updates tests, schemas, READMEs, and skill documentation.
| File | Description |
|---|---|
tests/Unit/Module/Repository/Stub/ReleaseStub.php |
Adds original-tag support. |
tests/Unit/Module/Repository/Internal/GitLab/GitLabRepositoryTest.php |
Tests GitLab prefix filtering. |
tests/Unit/Module/Repository/Internal/GitHub/GitHubRepositoryTest.php |
Tests GitHub prefix filtering. |
tests/Unit/Module/Downloader/DownloaderTest.php |
Tests forgetting releases by tag. |
tests/Unit/Module/Downloader/AssetSelectionTest.php |
Tests Bun asset selection. |
tests/Unit/Module/Config/Schema/Embed/RepositoryTest.php |
Tests prefix configuration parsing. |
src/Module/Repository/ReleaseInterface.php |
Exposes the original release tag. |
src/Module/Repository/Internal/Release.php |
Stores and returns release tags. |
src/Module/Repository/Internal/GitLab/GitLabRepository.php |
Filters GitLab tags by prefix. |
src/Module/Repository/Internal/GitLab/GitLabRelease.php |
Parses versions after removing prefixes. |
src/Module/Repository/Internal/GitLab/Factory.php |
Passes prefix configuration. |
src/Module/Repository/Internal/GitHub/GitHubRepository.php |
Filters GitHub tags by prefix. |
src/Module/Repository/Internal/GitHub/GitHubRelease.php |
Parses versions after removing prefixes. |
src/Module/Repository/Internal/GitHub/Factory.php |
Passes prefix configuration. |
src/Module/Downloader/Downloader.php |
Forgets deleted releases by original tag. |
src/Module/Config/Schema/Embed/Repository.php |
Defines tag-prefix. |
skills/dload-fetch-tool/references/troubleshooting.md |
Documents prefixed-tag troubleshooting. |
skills/dload-fetch-tool/references/registry-entry.md |
Documents prefix configuration. |
resources/software.schema.json |
Adds the JSON schema property. |
resources/software.json |
Registers Bun. |
README.md |
Documents the feature in English. |
README-zh.md |
Documents the feature in Chinese. |
README-ru.md |
Documents the feature in Russian. |
README-es.md |
Documents the feature in Spanish. |
dload.xsd |
Adds the XML attribute definition. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
This seems great to me! |
GitLab addresses release downloads by tag, so a release whose name differs from its tag (`CLI 1.2.3` for `cli/v1.2.3`) failed every asset download. The tag is URL-encoded as a single path segment, which a prefix like `cli/` requires. Assisted-By: Claude Opus 5.5
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.

🔍 What was changed
tag-prefixattribute on<repository>(and insoftware.json). Releases whose tag does not start with it are ignored, and the prefix is cut off before the version is parsed:tag-prefix="bun-"turnsbun-v1.4.2into versionv1.4.2. The version parser itself stays strict.ReleaseInterface::getTag(), and the version registry forgets a deleted release by that tag rather than one rebuilt from the version.tag-prefix="bun-"and an asset pattern that keeps only the plain build per OS/arch.Why?
Tools released with release-please or similar tooling carry a component prefix in their tags. Accepting any word prefix in the version parser (#131) would mix components of a monorepo:
cli-v2.0.0andsdk-v1.4.0would both count as versions of one tool, so DLoad could install the version and binaries of another component. An explicit per-repository prefix both parses such tags and selects the component.Checklist
bun-v1.4.2) #130dload get buninstallsbun-windows-x64.zip,bun --versionreports1.4.2(Windows x64)Review notes
-profile,-baseline,-musl,-android). DLoad does not rank them and takes the first match in API order, so a broad pattern like/^bun-.*/installs a profile build everywhere and the Android build on Linux. Hence the narrow pattern for now; ranking variants instead is Prefer the plain build among asset variants (musl, android, baseline) #134.AssetSelectionTestholds Bun's real asset list as the acceptance check for it, with the broad-pattern case skipped until then.Documentation
dload.xsd,software.schema.jsonand thedload-fetch-toolskill describetag-prefix.