Support repository-aware labels for GitHub blob URL smart chips#122
Draft
Copilot wants to merge 3 commits into
Draft
Support repository-aware labels for GitHub blob URL smart chips#122Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Add support for displaying file names in smart chips
Support file-path labels for GitHub blob URL smart chips
May 29, 2026
ianlewis
requested changes
Jun 14, 2026
|
|
||
| onLinkPreview(event); | ||
|
|
||
| expect(mockCardHeader.setTitle).toHaveBeenCalledWith("src/addon.ts"); |
Owner
There was a problem hiding this comment.
@copilot The title should include the repo name in addition to the filename. It should also handle situations where the path is very long.
The title should be (repository name without owner)(path) if less than 60 characters. Otherwise, it should be (repository name without owner) - (base file name).
Contributor
Author
There was a problem hiding this comment.
Updated in ee760d8. Blob URL titles now use repoName/path when the result is under 60 chars, and fall back to repoName - basename for long paths. I also updated src/addon.test.ts to cover both title formats.
Copilot
AI
changed the title
Support file-path labels for GitHub blob URL smart chips
Support repository-aware labels for GitHub blob URL smart chips
Jun 14, 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.
Description:
Direct GitHub file links were rendered as repository chips, hiding file context. This change updates blob URL chips to include the repository name (without owner) and handle long paths while preserving existing behavior for repo/issue/PR/user/project URLs.
URL parsing
parseGitHubURLdetects blob file URLs and extractspath.GitHubURLInfoincludes optionalpath?: string.Chip title selection
(repository name without owner)/(path)when the title is less than 60 characters.(repository name without owner) - (base file name)when the full path title is 60+ characters.onLinkPreviewapplies this title formatting before rendering repository cards.createRepositoryCardcontinues supporting an optionaltitleoverride (default:data.full_name).Coverage updates
Related Issues:
Checklist:
CONTRIBUTING.mddocumentation.CHANGELOG.mdif applicable.