GitHub new star notifications on your phone.

Get a low-priority push notification every time someone stars your GitHub repository, with the new total.

watchDeveloper toolsReleases Signature verified
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 GitHub

Add it as a webhook for Stars.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the GitHub stars 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 repository (or organization), go to Settings > Webhooks and click Add webhook.
  3. Paste your webhook URL as the Payload URL and set Content type to application/json.https://••••••••/•••••••• your personal URL, shown after install
  4. Enter a secret and copy the same secret into JustPush.
  5. Choose Let me select individual events, tick Stars, and save. GitHub sends a ping right away.
  6. Tick **Stars** in the webhook's events. GitHub calls this event `watch` for historical reasons; it fires when someone stars the repository.
  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.
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// GitHub → watch (new star)
2// Get a low-priority push notification every time someone stars your GitHub repository, with the new total.
3// Docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#watch
4
5// Header names can arrive in any case.
6function header(request, name) {
7 const headers = request.headers || {}
8 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
9 const value = key ? headers[key] : null
10 return Array.isArray(value) ? value[0] : value
11}
12
13// Only link to real http(s) URLs.
14function link(url, cta) {
15 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
16}
17
18function handleRequest(request) {
19 const body = request.body && typeof request.body === "object" ? request.body : {}
20 const event = header(request, "x-github-event")
21
22 // Saving the webhook makes GitHub send a ping; confirm the connection quietly.
23 if (event === "ping" || (body.zen && body.hook_id)) {
24 return {
25 title: "🔔 GitHub connected",
26 message: `Webhook for ${body.repository?.full_name ?? body.organization?.login ?? "your account"} is working`,
27 topic: "GitHub",
28 priority: -1,
29 }
30 }
31
32 // Guard: only watch events. The header decides when it's there; the payload's
33 // shape is the fallback (for example in Studio's Test runner).
34 if (event ? event !== "watch" : !(body.action === "started" && body.repository && !body.release)) {
35 console.log(`Ignoring GitHub "${event ?? "unknown"}" event`)
36 return null
37 }
38
39 const repo = body.repository?.full_name ?? "a repository"
40 if (body.action !== "started") {
41 console.log(`Skipping watch action "${body.action}"`)
42 return null
43 }
44
45 const stars = Number(body.repository?.stargazers_count)
46 const who = body.sender?.login
47
48 return {
49 title: `⭐ New star on ${repo}`,
50 message:
51 (who ? `@${who} starred it` : "Someone starred it") +
52 (Number.isFinite(stars) ? ` — now ${stars.toLocaleString("en-GB")} star${stars === 1 ? "" : "s"}` : ""),
53 topic: "GitHub",
54 priority: -1, // Low — a nice moment, not an interruption
55 buttons: link(body.sender?.html_url, "View profile"),
56 }
57}
Payload

The GitHub watch webhook

This is what GitHub sends to your URL for stars. It is a sample, trimmed to the fields recipes use.

watch · sample.json
1{
2 "action": "started",
3 "sender": {
4 "login": "octocat",
5 "html_url": "https://github.com/octocat"
6 },
7 "repository": {
8 "html_url": "https://github.com/acme/web",
9 "full_name": "acme/web",
10 "stargazers_count": 1234
11 }
12}
Security

How the GitHub signature is verified

X-Hub-Signature-256

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. Add the secret to the recipe in Studio and JustPush checks every request before your code runs, so requests that don't come from GitHub never reach your phone.

FAQ

GitHub new star 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 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.

Ready when you are

GitHub on your phone in two minutes.

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