diff --git a/entries/gitlab-mr-status.json b/entries/gitlab-mr-status.json new file mode 100644 index 00000000..65b40cf3 --- /dev/null +++ b/entries/gitlab-mr-status.json @@ -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" +} diff --git a/icons/gitlab-mr-status-6a57d4a9.svg b/icons/gitlab-mr-status-6a57d4a9.svg new file mode 100644 index 00000000..68f47583 --- /dev/null +++ b/icons/gitlab-mr-status-6a57d4a9.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/overview/gitlab-mr-status.md b/overview/gitlab-mr-status.md new file mode 100644 index 00000000..1d508b57 --- /dev/null +++ b/overview/gitlab-mr-status.md @@ -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. diff --git a/screenshots/gitlab-mr-status/chat-chip-hover.png b/screenshots/gitlab-mr-status/chat-chip-hover.png new file mode 100644 index 00000000..0c8a87ad Binary files /dev/null and b/screenshots/gitlab-mr-status/chat-chip-hover.png differ diff --git a/screenshots/gitlab-mr-status/status-bar.png b/screenshots/gitlab-mr-status/status-bar.png new file mode 100644 index 00000000..872b08c8 Binary files /dev/null and b/screenshots/gitlab-mr-status/status-bar.png differ