GitLab merge request notifications on your phone.

Get a push notification when a GitLab merge request is opened, marked ready, gets a review request, is approved, or is merged.

Merge Request HookCode hostingPull requests
How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into GitLab

Add it as a webhook for Merge request events.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the GitLab merge request events webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In your GitLab project (or group), go to Settings > Webhooks and click Add new webhook.
  3. Paste your webhook URL as the URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Under Trigger, tick Merge request events and click Add webhook. Use the Test dropdown to send a sample event.
  5. Tick **Merge request events** under **Trigger**. Pushes go out when a merge request is opened (not as a draft), marked ready, gets a new reviewer, is fully approved, or is merged. Edits, new commits, closes and single approvals are ignored.
  6. A group webhook covers every project in the group. Links in the push come from the payload, so self-managed GitLab instances work too.
  7. GitLab can sign deliveries with a **Signing token** (`webhook-signature`, HMAC-SHA256) or send a plain **Secret token** (`X-Gitlab-Token`), but JustPush doesn't check either yet, so keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// GitLab → Merge Request Hook (merge request)
2// Fires when a merge request is opened, marked ready, gets a review request, is approved, or is merged.
3// Docs: https://docs.gitlab.com/user/project/integrations/webhook_events/#merge-request-events
4
5// The merge request moments worth a push.
6const ACTIONS = {
7 open: { emoji: "🔀", verb: "opened", priority: 0 },
8 ready: { emoji: "🔀", verb: "ready for review", priority: 0 },
9 review: { emoji: "👀", verb: "review requested", priority: 0 },
10 approved: { emoji: "👍", verb: "approved", priority: 0 },
11 merge: { emoji: "🟣", verb: "merged", priority: -1 },
12}
13
14// Header names can arrive in any case.
15function header(request, name) {
16 const headers = request.headers || {}
17 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
18 const value = key ? headers[key] : null
19 return Array.isArray(value) ? value[0] : value
20}
21
22// Only link to real http(s) URLs.
23function link(url, cta) {
24 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
25}
26
27// Usernames from a list of GitLab users.
28function usernames(list) {
29 return Array.isArray(list) ? list.map((user) => user?.username).filter((name) => typeof name === "string") : []
30}
31
32function handleRequest(request) {
33 const body = request.body && typeof request.body === "object" ? request.body : {}
34 const event = header(request, "x-gitlab-event")
35
36 // Guard: only merge request events. The header decides when it's there; the payload's
37 // shape is the fallback (for example in Studio's Test runner).
38 if (event ? event !== "Merge Request Hook" : body.object_kind !== "merge_request") {
39 console.log(`Ignoring GitLab "${event ?? body.object_kind ?? "unknown"}" event`)
40 return null
41 }
42
43 const mr = body.object_attributes ?? {}
44 const changes = body.changes && typeof body.changes === "object" ? body.changes : {}
45 let action = mr.action
46 let reviewers = []
47
48 // "update" covers many things; only two of them are worth a push.
49 if (action === "update") {
50 const before = usernames(changes.reviewers?.previous)
51 reviewers = usernames(changes.reviewers?.current).filter((name) => !before.includes(name))
52 if (changes.draft?.previous === true && changes.draft?.current === false) action = "ready"
53 else if (reviewers.length) action = "review"
54 }
55
56 // Drafts aren't ready for eyes yet; closes, reopens and single approvals are skipped too.
57 if (!Object.prototype.hasOwnProperty.call(ACTIONS, action) || (action === "open" && mr.draft)) {
58 console.log(`Skipping merge request action "${mr.action ?? "unknown"}"`)
59 return null
60 }
61
62 const what = ACTIONS[action]
63 const repo = body.project?.path_with_namespace ?? mr.target?.path_with_namespace ?? "a project"
64 const branches = mr.source_branch && mr.target_branch ? `${mr.source_branch} → ${mr.target_branch}` : null
65 const who = body.user?.username
66 const detail =
67 action === "review"
68 ? `for ${reviewers.map((name) => `@${name}`).join(", ")}`
69 : who ? `by @${who}` : null
70
71 return {
72 title: `${what.emoji} MR ${mr.iid ? `!${mr.iid} ` : ""}${what.verb}: ${mr.title ?? "Untitled merge request"}`,
73 message: [repo, branches, detail].filter(Boolean).join(" · "),
74 topic: "GitLab",
75 priority: what.priority, // Normal while it needs eyes, Low once merged
76 buttons: link(mr.url, "View merge request"),
77 }
78}
Payload

The GitLab Merge Request Hook webhook

This is what GitLab sends to your URL for merge request events. It is a sample, trimmed to the fields recipes use.

Merge Request Hook · sample.json
1{
2 "user": {
3 "id": 51,
4 "name": "Sam Lee",
5 "email": "[REDACTED]",
6 "username": "sam-lee"
7 },
8 "labels": [],
9 "changes": {
10 "merge_status": {
11 "current": "checking",
12 "previous": "preparing"
13 }
14 },
15 "project": {
16 "id": 7,
17 "name": "web",
18 "web_url": "https://gitlab.example.com/acme/web",
19 "namespace": "Acme",
20 "default_branch": "main",
21 "path_with_namespace": "acme/web"
22 },
23 "assignees": [
24 {
25 "id": 51,
26 "name": "Sam Lee",
27 "username": "sam-lee"
28 }
29 ],
30 "reviewers": [
31 {
32 "id": 42,
33 "name": "Jane Doe",
34 "state": "unreviewed",
35 "username": "janedoe",
36 "re_requested": false
37 }
38 ],
39 "event_type": "merge_request",
40 "object_kind": "merge_request",
41 "object_attributes": {
42 "id": 930,
43 "iid": 42,
44 "url": "https://gitlab.example.com/acme/web/-/merge_requests/42",
45 "draft": false,
46 "state": "opened",
47 "title": "Add Apple Pay to checkout",
48 "action": "open",
49 "author_id": 51,
50 "created_at": "2026-09-28T09:20:11.000Z",
51 "updated_at": "2026-09-28T09:20:14.000Z",
52 "description": "Adds Apple Pay as a payment method.",
53 "source_branch": "feature/apple-pay",
54 "target_branch": "main",
55 "detailed_merge_status": "checking"
56 }
57}
FAQ

GitLab merge request notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into GitLab and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

GitLab on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.