Repository navigation
fix(guided-review): load the review list when glab is not installed - #153
Merged
Merged
Conversation
The GitLab listing asks `glab auth status --all` for its hosts, and a glab that could not be found threw out of it, so the whole review list failed, GitHub's PRs included. A CLI that is not found now throws a `CliNotFoundError`, which the GitLab listing reads as no GitLab hosts. A glab that is there but fails, cannot be executed or times out still fails the listing as before. Reported by a GitHub-only reviewer, who worked around it by setting the glab path to `/usr/bin/true`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Summary
A reviewer who had
ghbut notglabcould not load Guided Review's start screen.To list GitLab hosts, the plugin runs
glab auth status --all.When glab was missing, the "Could not run glab" error escaped the GitLab listing and failed the whole list, GitHub's PRs included.
They worked around it by setting the glab path to
/usr/bin/true, which prints nothing and so lists no GitLab hosts.CliNotFoundError: a forge CLI that is not found (ENOENT) now throws this subclass ofForgeError, with the same message as before.CliNotFoundErroras no GitLab hosts and returns an empty list.EACCES) or times out still fails the listing. Pasting a GitLab MR URL without glab still says glab could not run and points at the setting.Evidence
A new test in
server/forge/gitlab.test.tsreplays a glab that cannot be found. It failed with the old code'sForgeErrorand passes now.pnpm testpasses (467 tests),tsc --noEmitis clean, andpaseo plugin reload guided-reviewloads the plugin.Merge Danger
Door: two-way
One catch in the GitLab listing; reverting brings back the failure.
Blast Radius: low
If glab is missing because the glab path in the settings is wrong, the start screen now shows no GitLab hosts without saying why.
Starting a review from a GitLab MR URL still shows the error.