Fix extension install error message showing raw struct instead of owner/repo#12836
Merged
williammartin merged 2 commits intotrunkfrom Mar 5, 2026
Merged
Conversation
Co-authored-by: williammartin <[email protected]>
Copilot
AI
changed the title
[WIP] Fix error message formatting for gh-review-lab extension
Fix extension install error message showing raw struct instead of owner/repo
Mar 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the extension "not installable" error message displayed the raw Go struct representation of a repository object (e.g., &{github gh-review-lab }) instead of the human-readable owner/repo format.
Changes:
- Fix the
%sformat verb in the error string by replacing the barerepoargument withghrepo.FullName(repo), which serializes to"OWNER/REPO". - Add
TestManager_Install_not_installableto assert the corrected error format.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pkg/cmd/extension/manager.go |
Uses ghrepo.FullName(repo) in the "not installable" error message instead of the raw repo struct |
pkg/cmd/extension/manager_test.go |
Adds a test that confirms the error message uses the owner/repo format when no binary or script is found |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BagToad
approved these changes
Mar 4, 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.
When an extension has no usable release artifact or script, the error message printed the raw Go struct representation (
&{github gh-review-lab }) instead of the formattedowner/reponame.Changes
pkg/cmd/extension/manager.go: Replace barerepowithghrepo.FullName(repo)in the "not installable" error messagepkg/cmd/extension/manager_test.go: AddTestManager_Install_not_installableto assert the error message uses theowner/repoformatBefore:
After:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/cli/gh-extension-precompile/contents//home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(http block)https://api.github.com/repos/github/gh-review-lab/releases/latest/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.