# GitHub new issue notifications on your phone > Get a push notification when someone opens an issue on your GitHub repository. - Company: GitHub (https://www.justpush.io/recipes/github) - Event: `issues` (Issues) - Tags: Developer tools, Releases - Install: https://studio.justpush.io/recipes/github/new-issue - Web page: https://www.justpush.io/recipes/github/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 repository (or organization), go to Settings > Webhooks and click Add webhook. 3. Paste your webhook URL (shown in Studio after install) as the Payload URL and set Content type to application/json. 4. Enter a secret and copy the same secret into JustPush. 5. Choose Let me select individual events, tick Issues, and save. GitHub sends a ping right away. 6. Tick **Issues** in the webhook's events. Only newly opened issues push; the labels set at creation time show in the message. 7. GitHub signs every delivery with your secret (`X-Hub-Signature-256`), and JustPush checks it, so requests that don't come from GitHub are rejected. ## 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 // GitHub โ†’ issues (new issue) // Get a push notification when someone opens an issue on your GitHub repository. // Docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#issues // 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-github-event") // Saving the webhook makes GitHub send a ping; confirm the connection quietly. if (event === "ping" || (body.zen && body.hook_id)) { return { title: "๐Ÿ”” GitHub connected", message: `Webhook for ${body.repository?.full_name ?? body.organization?.login ?? "your account"} is working`, topic: "GitHub", priority: -1, } } // Guard: only issues events. The header decides when it's there; the payload's // shape is the fallback (for example in Studio's Test runner). if (event ? event !== "issues" : !(body.issue && !body.comment)) { console.log(`Ignoring GitHub "${event ?? "unknown"}" event`) return null } const repo = body.repository?.full_name ?? "a repository" const issue = body.issue if (body.action !== "opened" || !issue) { console.log(`Skipping issue action "${body.action}"`) return null } const labels = Array.isArray(issue.labels) ? issue.labels.map((label) => label?.name).filter(Boolean) : [] // Issues labelled as bugs or security problems deserve a louder ping. const urgent = labels.some((label) => /bug|security|urgent|critical|p0/i.test(label)) return { title: `๐Ÿž #${issue.number}: ${issue.title}`, message: repo + (issue.user?.login ? ` ยท by @${issue.user.login}` : "") + (labels.length ? ` ยท ${labels.join(", ")}` : ""), topic: "GitHub", priority: urgent ? 1 : 0, buttons: link(issue.html_url, "View issue"), } } ``` ## GitHub issues webhook payload (sample) ```json { "issue": { "user": { "login": "mark-v" }, "state": "open", "title": "Checkout total is off by one cent", "labels": [ { "name": "bug" } ], "number": 88, "html_url": "https://github.com/acme/web/issues/88" }, "action": "opened", "sender": { "login": "mark-v" }, "repository": { "full_name": "acme/web" } } ``` ## Signature check GitHub signs every webhook with an HMAC-SHA256 hash of the request body in the X-Hub-Signature-256 header, made with the secret you set on the webhook. JustPush checks it before the code runs. ## 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 GitHub 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.