Skip to content

fix: GitLab PR overview shows GitHub CLI error + glab mr list --state flag - #146

Merged
devlint merged 2 commits into
mainfrom
fix/138-gitlab-pr-overview
Aug 10, 2026
Merged

fix: GitLab PR overview shows GitHub CLI error + glab mr list --state flag#146
devlint merged 2 commits into
mainfrom
fix/138-gitlab-pr-overview

Conversation

@devlint

@devlint devlint commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • The PR panel's "CLI binary missing" detection is forge-agnostic, but always rendered the GitHub-specific "GitHub CLI not installed — install it from cli.github.com" message even on GitLab repos. Error/hint messages are now forge-specific via a new parameterized pr.error.cliNotInstalled/cliNotInstalledHint key (replacing the GitHub-only ghNotInstalled* keys), synced across all 5 locales.
  • glab mr list --state <value> is a gh-only flag convention — glab exposes one boolean flag per state (--opened/--closed/--merged/--all). Fixed both gl_list_mrs and gl_mr_count in gitlab.rs to use the correct flag via a shared gl_state_flag() helper.

Test plan

  • New composable test (usePrPanel-cli-missing.test.ts): GitHub vs GitLab CLI-missing errors render distinct, correct messages
  • New Rust unit tests for gl_state_flag(): closed/merged/all/opened+fallback — cargo test --lib gitlab:: passes (5/5)
  • Full frontend suite: 653/653 pass across 85 files

Fixes #138

Laurent Guitton 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
@devlint
devlint merged commit 4784f32 into main Aug 10, 2026
3 checks passed
@devlint
devlint deleted the fix/138-gitlab-pr-overview branch August 10, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR overview for Gitlab repository not working

1 participant