Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions entries/gitlab-mr-status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "gitlab-mr-status",
"displayName": "GitLab MR Status",
"description": "Shows the GitLab merge request for each thread's branch, with its pipeline and approvals, right above the composer. Mark the merge request ready, set it back to draft, or merge it with a merge, squash or rebase without leaving bb. Merge request links and !123 references in chat get chips with a hover card showing state, pipeline and branches. Thread rows show a colored !123 badge while you scan the sidebar. Requires the glab CLI, logged in on each machine that runs threads; self-hosted GitLab works.",
"icon": { "url": "./icons/gitlab-mr-status-6a57d4a9.svg" },
"tags": ["gitlab", "merge-requests", "pipelines", "ci", "glab", "code-review", "self-hosted"],
"author": { "name": "Yasser Rabee", "github": "YasserRabee", "url": "https://github.com/YasserRabee" },
"category": "code-and-reviews",
"source": { "git": { "url": "https://github.com/YasserRabee/bb-plugins.git", "subdir": "plugins/gitlab-mr-status", "range": "^0.2.1", "tagPrefix": "gitlab-mr-status/" } },
"screenshots": ["./screenshots/gitlab-mr-status/status-bar.png", "./screenshots/gitlab-mr-status/chat-chip-hover.png"],
"overview": "./overview/gitlab-mr-status.md"
}
16 changes: 16 additions & 0 deletions icons/gitlab-mr-status-6a57d4a9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions overview/gitlab-mr-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Each thread shows the GitLab merge request for its branch, where you already
look: above the composer, in the thread list and in chat.

## What you get

- A **status bar above the composer** with the MR's title, pipeline, approvals
and what needs attention, plus Mark ready, Draft and Merge (merge, squash or
rebase).
- **Rows in the thread context card** (the `threadContextCard` experiment) and
the Info tab: the MR, its state and its pipeline.
- A **`!12` badge on thread rows** in bb's thread list, colored by state with a
marker while the pipeline runs or fails. Turn on Organize → Rows → Metadata.
- **MR chips in chat messages**: a chip for each merge request a message
mentions (a full MR URL on any GitLab host glab knows, or `!12` for the
thread's project), with a hover card showing title, state, pipeline,
approvals, branches and author. Agents can also write
`::gitlab-mr{ref="!12"}` to place a chip in a reply. Choose chips, directive,
both or off in the plugin's settings.
- A `bb merge-request` command for agents and terminals.

## How it works

The plugin runs `glab` on the environment's own machine, in its workspace,
and looks up the merge request for the current branch, so every GitLab host
`glab auth login` knows works, self-hosted ones included. Environments whose
remote is not a GitLab host show nothing; an offline machine or a missing
`glab` login is shown as unavailable.
Binary file added screenshots/gitlab-mr-status/chat-chip-hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/gitlab-mr-status/status-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.