fix: GitLab PR overview shows GitHub CLI error + glab mr list --state flag - #146
Merged
Conversation
added 2 commits
August 10, 2026 14:55
) The PR panel's CLI-missing detection was forge-agnostic but always surfaced the GitHub-specific "GitHub CLI not installed" message/hint for any forge's missing CLI binary, including GitLab's glab. Both the message and hint are now parameterized on the active forge (pr.error.cliNotInstalled / cliNotInstalledHint), added to all 5 locales. Also fixed `glab mr list --state <value>`, which glab rejects with "Unknown flag: --state" — unlike gh, glab has no generic --state flag and instead exposes one boolean flag per state (--opened/--closed/--merged/--all). Extracted gl_state_flag() (with unit tests) and used it in both gl_list_mrs and gl_mr_count. disabled
# Conflicts: # CHANGELOG.md
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
pr.error.cliNotInstalled/cliNotInstalledHintkey (replacing the GitHub-onlyghNotInstalled*keys), synced across all 5 locales.glab mr list --state <value>is agh-only flag convention —glabexposes one boolean flag per state (--opened/--closed/--merged/--all). Fixed bothgl_list_mrsandgl_mr_countingitlab.rsto use the correct flag via a sharedgl_state_flag()helper.Test plan
usePrPanel-cli-missing.test.ts): GitHub vs GitLab CLI-missing errors render distinct, correct messagesgl_state_flag(): closed/merged/all/opened+fallback —cargo test --lib gitlab::passes (5/5)Fixes #138