Skip to content

The moment it happens

Announce opened and merged MRs in Slack

Your channel hears when a merge request in your project is opened or merged.

Runs
The moment it happens
Apps
GitLab
AI
Not needed
Access
read_api (polling); Maintainer role to add a webhook

Send this to your assistant

Create a ClickRuntime automation: post to #dev in Slack whenever a merge request in my GitLab project web-app is opened or merged, with the author and link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

On a GitLab project, two moments matter to people outside the author's immediate circle: when a merge request is opened, because someone must review it, and when it is merged, because QA, support or a release manager needs to know the change is now in. Learning about either through GitLab emails or by asking in chat is slow and unreliable, so reviews wait and releases are assembled from guesses.

When GitLab reports a merge request event, only the opened and merged actions are kept and a message is sent to Slack with the title, author, target branch and link. If your GitLab plan or setup makes webhooks awkward, the same result can come from checking merge requests updated after the last run.

Teams with a shared engineering channel, release managers and QA leads who follow merges.

What you get out of it

  • Reviewers hear about new work at once

    A merge request announced in the team channel gets claimed quickly, which reduces the hours it waits for a first look and keeps authors from stalling on blocked work. A faster first look means shorter cycle times.

  • Merges are visible to QA and support

    When a fix is merged, the people who promised it to a customer see it in the channel and can plan testing or a reply, instead of finding out from a release note a week later.

  • Release managers track what landed

    A running list of merges to main is a rough changelog in real time, which makes assembling release notes and spotting unexpected changes far easier. Surprises on main become rare and easy to trace to a single change.

  • Only meaningful events are posted

    Filtering to opened and merged avoids the noise of every comment and push, so people read the channel because each message marks a real milestone. A quiet, accurate channel keeps people reading rather than muting it.

  • Works with a webhook or polling

    Event delivery gives near instant messages, while the polling variant helps when you cannot add a webhook to the project, so teams are not blocked by admin permissions. Teams with limited admin rights can still get the same alerts.

How it works

What happens, step by step

  1. When a merge request in your GitLab project changes, ClickRuntime hears about it straight away.

  2. It ignores everything except merge requests being opened or merged.

  3. Your Slack channel gets who opened or merged it, its title and a link.

Before it runs live

  • Connect GitLab
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Announce opened and merged MRs in Slackjust nowSucceeded
Slack · #devMR !214 merged by Sam Patel: Add retry to webhook sender https://gitlab.com/acme/web-app/-/merge_requests/214

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other GitLab steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_notified_when_merge_requests_are_opened_or_merged.pyexample
from clickruntime import on_event, notify

@on_event
def handle(event):
    body = event.json
    mr = body.get("object_attributes", {})
    if body.get("object_kind") != "merge_request" or mr.get("action") not in ("open", "merge"):
        return {"skipped": True}
    verb = "opened" if mr["action"] == "open" else "merged"
    notify.slack(f"MR !{mr['iid']} {verb} by {body['user']['name']}: {mr['title']}\n{mr['url']}", channel="#dev")
    return {"posted": mr["iid"]}

FAQ

Common questions

Does it announce closed merge requests?
Only opened and merged are included by default, because closed without merging is less often something the team needs to act on. If you want closures too, that action can be added and approved. You can add them if useful to your team.
Can it cover several GitLab projects?
Yes. Add the webhook to each project, or use a group-level webhook if your plan supports it. Each message includes the project name, so a shared channel stays easy to follow. The group webhook is the least work.
Can it mention the reviewer in Slack?
It can include the reviewer's name from the merge request. Matching a GitLab user to a Slack user for an actual mention needs a small mapping, which you can describe to your AI assistant. That small lookup is easy to add.
What permissions does it need?
read_api (polling); Maintainer role to add a webhook. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Announce opened and merged MRs in Slack” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.