fix: display of repositories in search modals (CM-1006)#1718
Merged
joanagmaia merged 3 commits intomainfrom Mar 3, 2026
Merged
fix: display of repositories in search modals (CM-1006)#1718joanagmaia merged 3 commits intomainfrom
joanagmaia merged 3 commits intomainfrom
Conversation
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves how repository names are displayed in the search modal results by normalizing names derived from repository URLs, aiming for a consistent, user-friendly owner/repo-style display across hosting platforms.
Changes:
- Updated
normalizeRepoNameto use URL hostname/path rules to produce consistent repo display names. - Updated the search results component to render repositories from a computed, transformed list rather than using
props.repositoriesdirectly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/app/components/shared/utils/helper.ts | Refines repository name normalization logic based on URL hostname/path parsing. |
| frontend/app/components/shared/layout/search/search-result.vue | Introduces a computed repositories list to normalize repo names before rendering and updates template conditions/loops to use it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
emlimlf
approved these changes
Mar 3, 2026
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.
This pull request refactors how repository names are displayed in the search results component to provide more user-friendly and consistent naming, especially across different repository hosting platforms. The main change is the introduction of the
normalizeRepoNameutility, which standardizes repository name formatting based on the repository URL. Additionally, the component now uses a computed property to transform repository data before rendering.Repository display improvements:
normalizeRepoNameutility function inhelper.tsto format repository names based on their URL, showingowner/repofor GitHub, GitLab, and similar hosts, and the full path for others; falls back to the original name if parsing fails.search-result.vueto use a computedrepositoriesproperty that maps and normalizes repository names before rendering, ensuring consistent display in all relevant sections.props.repositoriesin template conditions and loops with the newrepositoriescomputed property for clarity and correctness. [1] [2]Code organization:
normalizeRepoNameutility insearch-result.vueto enable repository name normalization.Issues vs fixes examples
Global Search
Issue:


Fix:
Project Search
Issue:


Fix: