feat: expose description, conflicts, and review state on merge request items - #369
Open
mglaman wants to merge 1 commit into
Open
feat: expose description, conflicts, and review state on merge request items#369mglaman wants to merge 1 commit into
mglaman wants to merge 1 commit into
Conversation
…t items Agents triaging an MR from `mr:list` had to fetch it again through `glab api` to learn whether it needs a rebase or is blocked on unresolved review threads. GitLab's list endpoint already returns `description`, `has_conflicts`, `blocking_discussions_resolved`, and `detailed_merge_status`, so `MergeRequestItem` now carries them and the markdown and llm formatters render them. `is_mergeable` stays as-is; `detailed_merge_status` is its non-deprecated replacement. Closes #366 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
mr:listnow reports each MR's description, whether it has conflicts, whether blocking discussions are resolved, and GitLab'sdetailed_merge_statusin--format=json,--format=md, and--format=llm. Thetexttable is unchanged.Why
Closes #366. An agent triaging an MR needs to tell "needs rebase" apart from "blocked on review" and read the MR body for issue links.
MergeRequestItemonly carried the deprecatedmerge_status-derivedis_mergeable, so agents had to re-fetch the MR throughglab api. The list endpoint already returns all four fields, so this costs no extra requests.How
New constructor params on
MergeRequestItemhave defaults ('',false,true,'') so existing constructions keep compiling;blocking_discussions_resolveddefaults totruewhen GitLab omits it.MergeRequestListResultandmr:statusare untouched.Testing
Live,
php drupalorg mr:list 3619614 --format=llm:php drupalorg mr:list project/drupal --format=md | head -8:🤖 Generated with Claude Code