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.
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
Every day, ClickRuntime lists the forks on your GitHub account.
For each fork, it compares the default branch with the original project's.
It compares the result with yesterday's, which it remembers.
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
Build your own
Need it to work differently?
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
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?
Can it sync the fork for me?
Does it check organisation forks?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Back up to GitHub with Telegram alerts
Every day your exports are saved to a GitHub repository, and Telegram tells you which files changed.
See how it worksGet a daily summary of merged work on Telegram
Each morning Telegram sends a short summary of the pull requests merged in your repository yesterday.
See how it worksGet GitHub issue updates on Telegram
Telegram messages you when an issue in your repository is opened, commented on or closed, with the title and a link.
See how it worksKeep exploring
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.