Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
merged 1 commit into from
Feb 25, 2025

Conversation

vansangpfiev
Copy link
Contributor

Describe Your Changes

This pull request introduces a new feature to filter repository lists by tags in the Models and ModelSourceService 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 the GetRepositoryList method to include an optional tag parameter and adjusted the call to model_src_svc_->GetRepositoryList to pass the tag if provided.
  • engine/controllers/models.h: Modified the GetRepositoryList method declaration and the corresponding ADD_METHOD_TO macro to include the new tag parameter. [1] [2]

Modifications to Data Handling and Storage:

  • engine/services/model_source_service.cc: Updated the GetRepositoryList 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 the ModelInfo struct to store detailed repository information, including tags. Updated the cortexso_repos_ map to use ModelInfo 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

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@vansangpfiev vansangpfiev force-pushed the s/chore/hub-filter-by-tag branch from 26e4512 to 08d16e2 Compare February 24, 2025 07:42
@vansangpfiev vansangpfiev merged commit 752c2c5 into dev Feb 25, 2025
8 checks passed
@vansangpfiev vansangpfiev deleted the s/chore/hub-filter-by-tag branch February 25, 2025 01:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants