Daily
Refresh a generated file in your repo every day
A stats badge, data file or page in your repo is regenerated and committed once a day.
- Runs
- Daily
- Apps
- GitHub
- AI
- Yes, uses the built-in AI allowance
- Access
- Contents: read+write
Send this to your assistant
Create a ClickRuntime automation: every day at 6am, get my follower counts, render them into stats.svg and commit it to my profile repo janedoe/janedoe.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Some files in a repository are supposed to be current and are not: a stats badge in the README, a generated JSON list of contributors, a changelog assembled from external data, a status page that reflects today's numbers. They are updated by hand when someone remembers, so the README shows last quarter's download count and the project looks neglected to anyone who visits.
Once a day the new content is fetched or generated, and the file's current SHA is read from GitHub so the update is applied cleanly. The new version is then committed to the repository. For Markdown files, an AI proofreading step can tidy wording before the commit.
Open source maintainers, documentation owners and anyone with a generated file that should simply always be fresh will get the most out of it, and the schedule keeps working through holidays and busy release weeks.
What you get out of it
Visitors see current numbers
A README that shows this week's figures signals an active project to anyone deciding whether to adopt it, which matters for first impressions on a repository's front page. Stale numbers quietly undermine trust in a project.
The commit history shows the refresh
Each update appears as a dated commit, so you can see when a value changed and confirm that the refresh actually ran, with a diff showing exactly what moved. That makes it easy to prove the schedule is healthy.
No cron server or workflow to maintain
The schedule runs outside your repository, so you do not need to write a GitHub Actions workflow, manage its permissions or keep it from being disabled after 60 days of inactivity.
Proofreading catches slips in copy
When the file is Markdown, the optional AI pass can fix typos and awkward phrasing before the commit, which is useful for generated text that no human reads before it goes live.
Safe updates through the SHA
Reading the existing file's SHA first means the commit replaces exactly the version it saw, so it will not silently overwrite a manual edit made between the read and the write.
How it works
What happens, step by step
Once a day, the automation creates the latest version of your file, such as a stats badge or data file.
If you want, AI proofreads text files first.
The new version is saved to your GitHub repo with a short description, like "Update stats.svg".
Before it runs live
- Connect GitHub
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other GitHub steps into one automation
Under the hood
The code that runs this automation
import base64
from clickruntime import on_trigger, credentials, http
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)
resp.raise_for_status()
return resp.json() if resp.content else None
REPO, PATH = "janedoe/janedoe", "stats.svg"
@on_trigger
def run(event):
user = gh("GET", "/users/janedoe")
svg = (f'<svg xmlns="http://www.w3.org/2000/svg" width="320" height="60">'
f'<text x="10" y="35" font-family="sans-serif" font-size="18">'
f'{user["followers"]} followers · {user["public_repos"]} repos</text></svg>\n')
current = gh("GET", f"/repos/{REPO}/contents/{PATH}")
if base64.b64decode(current["content"]).decode() == svg:
return {"changed": False}
gh("PUT", f"/repos/{REPO}/contents/{PATH}", json={
"message": "Update stats.svg", "sha": current["sha"], "content": base64.b64encode(svg.encode()).decode()})
return {"changed": True, "followers": user["followers"]}FAQ
Common questions
What kind of file can it update?
Will it commit if nothing has changed?
Is the AI step required?
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 your data to a GitHub repo every night
Your exports and configs are committed to a private repo each night, only when something changed, with a summary by email.
See how it worksGet weekly stats for your repos by email
Every Monday you see stars, forks, open issues and open pull requests for your repos, and how they changed since last week.
See how it worksGet a morning digest of new pull requests
Each weekday morning you get one email with the pull requests opened in the last day, grouped by repo.
See how it worksKeep exploring
Set up “Refresh a generated file in your repo every day” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.