This repository was archived by the owner on Jul 4, 2025. It is now read-only.
fix: add filter by tag for repository list #2021
Merged
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.
Describe Your Changes
This pull request introduces a new feature to filter repository lists by tags in the
Models
andModelSourceService
classes. The most important changes include updating method signatures, modifying the repository list retrieval logic, and restructuring data storage.Enhancements to Repository List Filtering:
engine/controllers/models.cc
: Updated theGetRepositoryList
method to include an optionaltag
parameter and adjusted the call tomodel_src_svc_->GetRepositoryList
to pass the tag if provided.engine/controllers/models.h
: Modified theGetRepositoryList
method declaration and the correspondingADD_METHOD_TO
macro to include the newtag
parameter. [1] [2]Modifications to Data Handling and Storage:
engine/services/model_source_service.cc
: Updated theGetRepositoryList
method to filter repositories by tags if a tag filter is provided. This involved adding logic to check for and apply the tag filter while retrieving the repository list.engine/services/model_source_service.h
: Introduced theModelInfo
struct to store detailed repository information, including tags. Updated thecortexso_repos_
map to useModelInfo
instead of a simple string vector. [1] [2]These changes improve the functionality of the repository list retrieval by allowing users to filter results based on tags, enhancing the overall usability of the service.
Fixes Issues
Self Checklist