GitLab deployment notifications on your phone.

Get a push notification when a GitLab deployment succeeds or fails, with an urgent push when production fails. Filter by environment if you like.

Deployment HookCode hostingDeployments
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 Deployment 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 deployment 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 Deployment events and click Add webhook. Use the Test dropdown to send a sample event.
  5. Tick **Deployment events** under **Trigger**. Every successful or failed deployment pushes; running, canceled, blocked and approval events are ignored. Options go on the URL:
  6. `?env=production` only pushes for one environment (matches its name, slug or tier).
  7. `?failed=1` skips successful deployments.
  8. ```
  9. your webhook URL?env=production&failed=1
  10. ```
  11. A failed deploy to a **production**-tier environment is Urgent. When someone rejects a deployment that needs approval, GitLab also sends a `failed` event for it, so a rejection gives a failure push too.
  12. 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 → Deployment Hook (deployment finished)
2// Fires when a deployment succeeds or fails. Add ?env=production to the URL to only hear about one
3// environment, and ?failed=1 to skip successful deployments.
4// Docs: https://docs.gitlab.com/user/project/integrations/webhook_events/#deployment-events
5
6// Header names can arrive in any case.
7function header(request, name) {
8 const headers = request.headers || {}
9 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
10 const value = key ? headers[key] : null
11 return Array.isArray(value) ? value[0] : value
12}
13
14// Only link to real http(s) URLs.
15function link(url, cta) {
16 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
17}
18
19// Query flags such as ?failed=1.
20function flag(request, name) {
21 return ["1", "true", "yes"].includes(String(request.query?.[name] ?? "").toLowerCase())
22}
23
24function handleRequest(request) {
25 const body = request.body && typeof request.body === "object" ? request.body : {}
26 const event = header(request, "x-gitlab-event")
27
28 // Guard: only deployment events. The header decides when it's there; the payload's
29 // shape is the fallback (for example in Studio's Test runner).
30 if (event ? event !== "Deployment Hook" : body.object_kind !== "deployment") {
31 console.log(`Ignoring GitLab "${event ?? body.object_kind ?? "unknown"}" event`)
32 return null
33 }
34
35 // Only finished deployments; running, canceled, blocked and approval events are skipped.
36 const failed = body.status === "failed"
37 if (!failed && (body.status !== "success" || flag(request, "failed"))) {
38 console.log(`Skipping deployment status "${body.status ?? "unknown"}"`)
39 return null
40 }
41
42 // ?env=production matches the environment's name, slug or tier.
43 const only = typeof request.query?.env === "string" ? request.query.env.trim().toLowerCase() : ""
44 const names = [body.environment, body.environment_slug, body.environment_tier]
45 if (only && !names.some((value) => typeof value === "string" && value.toLowerCase() === only)) {
46 console.log(`Skipping deployment to "${body.environment ?? "unknown"}"`)
47 return null
48 }
49
50 const env = body.environment ?? "an environment"
51 const production = body.environment_tier === "production"
52 const repo = body.project?.path_with_namespace ?? body.project?.name ?? "a project"
53 const who = body.user?.username
54
55 return {
56 title: failed ? `❌ Deploy to ${env} failed` : `✅ Deployed to ${env}`,
57 message:
58 [repo, body.short_sha].filter(Boolean).join(" · ") +
59 (body.commit_title ? ` — ${body.commit_title}` : "") +
60 (who ? ` (@${who})` : ""),
61 topic: "GitLab",
62 // Urgent when production is broken, High for other failed deploys,
63 // Normal for a production release, Low for other successful deploys.
64 priority: failed ? (production ? 2 : 1) : production ? 0 : -1,
65 buttons: [
66 ...link(body.deployable_url, "View job"),
67 ...(failed ? [] : link(body.environment_external_url, "Open site")),
68 ],
69 }
70}
Payload

The GitLab Deployment Hook webhook

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

Deployment Hook · sample.json
1{
2 "user": {
3 "id": 42,
4 "name": "Jane Doe",
5 "email": "[REDACTED]",
6 "username": "janedoe"
7 },
8 "status": "failed",
9 "project": {
10 "id": 7,
11 "name": "web",
12 "web_url": "https://gitlab.example.com/acme/web",
13 "namespace": "Acme",
14 "default_branch": "main",
15 "path_with_namespace": "acme/web"
16 },
17 "user_url": "https://gitlab.example.com/janedoe",
18 "short_sha": "279484c0",
19 "commit_url": "https://gitlab.example.com/acme/web/-/commit/279484c09fbe69ededfced8c1bb6e6d24616b468",
20 "environment": "production",
21 "object_kind": "deployment",
22 "commit_title": "Fix checkout totals rounding",
23 "deployable_id": 5530,
24 "deployment_id": 915,
25 "deployable_url": "https://gitlab.example.com/acme/web/-/jobs/5530",
26 "environment_slug": "production",
27 "environment_tier": "production",
28 "status_changed_at": "2026-09-28T14:02:10.000+02:00",
29 "environment_external_url": "https://shop.example.com"
30}
FAQ

GitLab deployment 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.