Skip to content

feat: expose description, conflicts, and review state on merge request items - #369

Open
mglaman wants to merge 1 commit into
mainfrom
mr-item-review-fields
Open

feat: expose description, conflicts, and review state on merge request items#369
mglaman wants to merge 1 commit into
mainfrom
mr-item-review-fields

Conversation

@mglaman

@mglaman mglaman commented Aug 28, 2026

Copy link
Copy Markdown
Owner

What changed

mr:list now reports each MR's description, whether it has conflicts, whether blocking discussions are resolved, and GitLab's detailed_merge_status in --format=json, --format=md, and --format=llm. The text table 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. MergeRequestItem only carried the deprecated merge_status-derived is_mergeable, so agents had to re-fetch the MR through glab api. The list endpoint already returns all four fields, so this costs no extra requests.

How

New constructor params on MergeRequestItem have defaults ('', false, true, '') so existing constructions keep compiling; blocking_discussions_resolved defaults to true when GitLab omits it. MergeRequestListResult and mr:status are untouched.

Testing

vendor/bin/phpcs src tests
vendor/bin/phpstan analyse src
vendor/bin/phpunit   # OK (170 tests, 559 assertions)

Live, php drupalorg mr:list 3619614 --format=llm:

      <mergeable>no</mergeable>
      <has_conflicts>no</has_conflicts>
      <blocking_discussions_resolved>yes</blocking_discussions_resolved>
      <detailed_merge_status>unchecked</detailed_merge_status>
      <author>goba</author>
      <url>https://git.drupalcode.org/project/drupal/-/merge_requests/16890</url>
      <updated_at>2026-08-28T12:01:10.659Z</updated_at>
      <description>Closes #3619614</description>

php drupalorg mr:list project/drupal --format=md | head -8:

- **!16891** [opened] [Draft: Keep the load-time default revision status on content entities](https://git.drupalcode.org/project/drupal/-/merge_requests/16891)
  - Branch: `3619696-loaded-default-revision-flag` → `main`
  - Author: amateescu | Updated: 2026-08-28T13:58:32.768Z
  - Conflicts: no | Discussions: resolved | Merge status: unchecked

    Closes #3619696

🤖 Generated with Claude Code

…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>
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.

mr:list / mr:status: expose description, has_conflicts, and blocking_discussions_resolved

1 participant