# GitLab new issue notifications on your phone > Get a push notification when someone opens an issue or incident in your GitLab project. - Company: GitLab (https://www.justpush.io/recipes/gitlab) - Event: `Issue Hook` (Issue events) - Tags: Code hosting, Issues & tickets - Install: https://studio.justpush.io/recipes/gitlab/new-issue - Web page: https://www.justpush.io/recipes/gitlab/new-issue ## Setup 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 (shown in Studio after install) as the URL. 4. Under Trigger, tick Issue events and click Add webhook. Use the Test dropdown to send a sample event. 5. Tick **Issue events** under **Trigger** (and **Confidential issue events** if you want those too). Pushes go out when an issue or incident is opened; edits, closes and reopens 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. ## Code Studio calls `handleRequest(request)` with the incoming webhook (`{ method, headers, body, query, raw }`) and sends the message object it returns. Returning `null` sends nothing. ```js // GitLab → Issue Hook (new issue) // Fires when someone opens an issue (or incident) in a project or group your webhook covers. // Docs: https://docs.gitlab.com/user/project/integrations/webhook_events/#work-item-events // Header names can arrive in any case. function header(request, name) { const headers = request.headers || {} const key = Object.keys(headers).find((k) => k.toLowerCase() === name) const value = key ? headers[key] : null return Array.isArray(value) ? value[0] : value } // Only link to real http(s) URLs. function link(url, cta) { return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : [] } function handleRequest(request) { const body = request.body && typeof request.body === "object" ? request.body : {} const event = header(request, "x-gitlab-event") const issue = body.object_attributes ?? {} // Issues arrive as object_kind "issue"; incidents and other work items as "work_item". const isIssue = body.object_kind === "issue" || (body.object_kind === "work_item" && issue.type === "Incident") // Guard: only issue events (confidential issues use their own header). The header decides // when it's there; the payload's shape is the fallback (for example in Studio's Test runner). if ((event ? !["Issue Hook", "Confidential Issue Hook"].includes(event) : false) || !isIssue) { console.log(`Ignoring GitLab "${event ?? body.object_kind ?? "unknown"}" event`) return null } // Only newly opened issues; edits, closes and reopens are skipped. if (issue.action !== "open") { console.log(`Skipping issue action "${issue.action ?? "unknown"}"`) return null } const repo = body.project?.path_with_namespace ?? body.project?.name ?? "a project" const list = Array.isArray(body.labels) ? body.labels : Array.isArray(issue.labels) ? issue.labels : [] const labels = list.map((label) => label?.title).filter((title) => typeof title === "string") const incident = issue.type === "Incident" // Incidents and issues labelled as bugs or security problems deserve a louder ping. const urgent = incident || labels.some((label) => /bug|security|urgent|critical|p0/i.test(label)) return { title: `${incident ? "🚨" : "🐞"} ${issue.iid ? `#${issue.iid}: ` : ""}${issue.title ?? "New issue"}`, message: repo + (body.user?.username ? ` · by @${body.user.username}` : "") + (issue.confidential ? " · confidential" : "") + (labels.length ? ` · ${labels.join(", ")}` : ""), topic: "GitLab", priority: urgent ? 1 : 0, buttons: link(issue.url, "View issue"), } } ``` ## GitLab Issue Hook webhook payload (sample) ```json { "user": { "id": 77, "name": "Mark V", "email": "[REDACTED]", "username": "mark-v" }, "labels": [ { "id": 206, "type": "ProjectLabel", "color": "#d9534f", "title": "bug" } ], "changes": [], "project": { "id": 7, "name": "web", "web_url": "https://gitlab.example.com/acme/web", "namespace": "Acme", "default_branch": "main", "path_with_namespace": "acme/web" }, "assignees": [], "event_type": "issue", "object_kind": "issue", "object_attributes": { "id": 3011, "iid": 88, "url": "https://gitlab.example.com/acme/web/-/issues/88", "type": "Issue", "state": "opened", "title": "Checkout total is off by one cent", "action": "open", "labels": [ { "id": 206, "type": "ProjectLabel", "color": "#d9534f", "title": "bug" } ], "author_id": 77, "created_at": "2026-09-28T10:02:43.000Z", "project_id": 7, "updated_at": "2026-09-28T10:02:43.000Z", "description": "Totals are rounded per line instead of per order.", "confidential": false } } ``` ## FAQ ### 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.