Skip to content

feat(github): filter remote versions by version_prefix#6408

Merged
jdx merged 3 commits intojdx:mainfrom
risu729:github-ls-remote-filter-prefix
Sep 25, 2025
Merged

feat(github): filter remote versions by version_prefix#6408
jdx merged 3 commits intojdx:mainfrom
risu729:github-ls-remote-filter-prefix

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Sep 25, 2025

This is to fix bitwarden-secrets-manager in the registry.
https://github.com/jdx/mise-versions/blob/main/docs/bitwarden-secrets-manager

I believe this is okay for most cases, and this matches with tag_regex behaviour in the ubi backend.

Copilot AI review requested due to automatic review settings September 25, 2025 07:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements filtering of remote versions by version_prefix for the GitHub backend, matching the existing behavior in GitLab. The change ensures that when a version_prefix is configured, only releases with tags that start with that prefix are included in the available versions list.

  • Adds version_prefix filtering logic to both GitLab and GitHub release processing
  • Updates documentation to reflect that versions are filtered by prefix before stripping

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/backend/github.rs Adds version_prefix filtering to both GitLab and GitHub release processing flows
docs/dev-tools/backends/gitlab.md Updates documentation to clarify that filtering occurs before prefix stripping
docs/dev-tools/backends/github.md Updates documentation to clarify that filtering occurs before prefix stripping

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +48 to +51
.filter(|r| {
opts.get("version_prefix")
.map_or(true, |p| r.tag_name.starts_with(p))
})
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

The filtering logic is duplicated between GitLab and GitHub branches. Consider extracting this into a helper method to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
@jdx jdx merged commit 6dca3f4 into jdx:main Sep 25, 2025
18 checks passed
@risu729 risu729 deleted the github-ls-remote-filter-prefix branch September 25, 2025 12:57
@jdx jdx mentioned this pull request Sep 25, 2025
jdx added a commit that referenced this pull request Sep 25, 2025
### 📦 Registry

- fix mise-ghcup plugin managed tools descriptions by @risu729 in
[#6411](#6411)
- add Tinymist by @3w36zj6 in
[#6412](#6412)
- revert djinni backend to ubi by @risu729 in
[#6410](#6410)

### 🚀 Features

- **(github)** filter remote versions by version_prefix by @risu729 in
[#6408](#6408)
- Remove experimental labels for GitHub and HTTP backends by @Copilot in
[#6415](#6415)

### 🧪 Testing

- **(vfox)** replace flaky external tests with local dummy plugin by
@jdx in [#6403](#6403)

### New Contributors

- @Copilot made their first contribution in
[#6415](#6415)

Co-authored-by: mise-en-dev <release@mise.jdx.dev>
@jdx jdx mentioned this pull request Sep 25, 2025
jdx pushed a commit that referenced this pull request Sep 25, 2025
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.

3 participants