Skip to content

On a schedule

Get told on Telegram when your forks fall behind

Telegram tells you when one of your GitHub forks falls behind the original project, and by how many commits.

Runs
On a schedule
Apps
GitHub, Telegram
AI
Not needed
Access
GitHub read; bot token

Send this to your assistant

Create a ClickRuntime automation: every day, check my GitHub forks against their upstream repos and message me on Telegram when one falls behind or catches up.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A developer keeps forks of several open-source libraries with small patches for their own projects. Months later they discover a fork is hundreds of commits behind, missing security fixes, and the merge is now painful.

A daily check that reports only when a fork starts to fall behind gives them a nudge while syncing is still easy. Forks stay current with little effort.

What you get out of it

  • Sync while it is still easy

    Hearing about a fork as soon as it falls behind means a small merge instead of a big one.

  • Security fixes are not missed

    Upstream fixes reach your fork sooner when you know they are there.

  • Only changes are reported

    You get a message when a fork's status changes, not every day. Quiet days mean everything is in step.

  • All forks in one check

    Every fork on your account is checked. No need to visit each one.

How it works

What happens, step by step

  1. Every day, ClickRuntime lists the forks on your GitHub account.

  2. For each fork, it compares the default branch with the original project's.

  3. It compares the result with yesterday's, which it remembers.

  4. When a fork falls behind or catches up, your Telegram bot sends a message with the number of commits.

Before it runs live

  • Connect GitHub
  • Connect Telegram

What you get

RunsOn a schedule
Get told on Telegram when your forks fall behindtoday, 9:00Succeeded
Telegram · GitHub botFork status northwind-dev/markdown-lite is 23 commits behind upstream/markdown-lite

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other GitHub and Telegram steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
fork_status_monitor.pyexample
from clickruntime import on_trigger, credentials, http, state

def gh(method, path, **kw):
    resp = http.request(method, f"https://api.github.com{path}", headers={
        "Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
    return resp.raise_for_status() or (resp.json() if resp.content else None)
CHAT_ID = "123456789"

def telegram(text):
    http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage",
              json={"chat_id": CHAT_ID, "text": text, "disable_web_page_preview": True}).raise_for_status()

@on_trigger
def run(event):
    forks = [r for r in gh("GET", "/user/repos", params={"type": "owner", "per_page": 100}) if r["fork"]]
    before, now, changes = state.get("behind") or {}, {}, []
    for f in forks:
        repo = gh("GET", f"/repos/{f['full_name']}")
        parent = repo["parent"]
        cmp = gh("GET", f"/repos/{f['full_name']}/compare/{repo['default_branch']}...{parent['owner']['login']}:{parent['default_branch']}")
        now[f["full_name"]] = cmp["ahead_by"]
        if (cmp["ahead_by"] > 0) != (before.get(f["full_name"], 0) > 0):
            changes.append(f"{f['full_name']} is {cmp['ahead_by']} commits behind {parent['full_name']}" if cmp["ahead_by"] else f"{f['full_name']} is up to date")
    if changes:
        telegram("Fork status\n" + "\n".join(changes))
    state.set("behind", now)
    return {"forks": len(forks), "changes": len(changes)}

FAQ

Common questions

Which branch is compared?
Your fork's default branch against the original project's default branch.
Can it sync the fork for me?
It can, for forks without your own changes, using GitHub's sync feature. By default it only tells you, since a sync could conflict with your patches.
Does it check organisation forks?
Yes. Name the organisation and its forks are checked as well as your own.
What permissions does it need?
GitHub read; bot token. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get told on Telegram when your forks fall behind” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.