Every 5 minutes
Get an AI review on every new pull request
Each new pull request gets a review comment within minutes, checked against your own guidelines.
- Runs
- Every 5 minutes
- Apps
- GitHub
- AI
- Yes, uses the built-in AI allowance
- Access
- Pull requests: read, Issues or Pull requests: write
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check acme/app for new pull requests, review the changes against the guidelines in CONTRIBUTING.md, and post the review as a comment on the pull request.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
On a small engineering team, a new pull request can sit for a day before anyone looks at it, and when someone does, the first round of comments is often about the obvious: a missing null check, a leftover console.log, a function that no longer matches its docstring. The author has already switched tasks, so the cycle of small fixes drags a two-hour change into a week.
Every 5 minutes, open pull requests that have not been reviewed yet are found. For each, the changed files and patches are fetched and ClickRuntime's built-in AI reads the diff and writes a review comment with specific observations. It is posted on the PR, and the PR is marked so it is not reviewed twice.
Teams with few senior reviewers, solo maintainers and anyone who wants a quick first opinion before a human looks will find it most useful.
What you get out of it
Authors get feedback within minutes
A comment lands while the author still has the code in their head, so small mistakes are fixed in the same sitting rather than after a context switch the next day.
Human reviewers start further ahead
By the time a teammate opens the PR, the trivial issues are already flagged, so their review time goes to design and logic, which is where their judgment is actually needed.
Solo maintainers get a second pair of eyes
Someone who merges their own work or reviews contributions alone gets an independent read of each diff, which catches mistakes that familiarity makes invisible. It works like a quick sanity check on every change before it goes anywhere.
Contributors feel acknowledged
A first-time contributor who receives a thoughtful comment shortly after opening a PR is more likely to return than one who hears nothing for a week. That small courtesy has an outsized effect on community goodwill and repeat contributions.
Each PR is reviewed once
Marking pull requests as handled means the comment is not repeated after every push, which keeps the conversation tidy and avoids notification spam for the author. Authors are not pinged repeatedly for the same pull request.
How it works
What happens, step by step
Every five minutes, ClickRuntime looks for open pull requests in your GitHub repo that it hasn't reviewed yet.
It reads the changed files.
AI reviews the changes against your own guidelines, such as your contributing rules.
The review is posted as a comment on the pull request.
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
- Act only on the items that match your own rules, and skip the rest
- 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, ai, state, report_fetched
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 = "acme/app"
@on_trigger
def run(event):
reviewed = set(state.get("reviewed") or [])
prs = [p for p in gh("GET", f"/repos/{REPO}/pulls", params={"state": "open", "per_page": 30})
if p["number"] not in reviewed and not p["draft"]]
report_fetched(len(prs))
if not prs:
return {"reviewed": 0}
guide = base64.b64decode(gh("GET", f"/repos/{REPO}/contents/CONTRIBUTING.md")["content"]).decode()[:4000]
for pr in prs:
files = gh("GET", f"/repos/{REPO}/pulls/{pr['number']}/files", params={"per_page": 50})
diff = "\n".join(f"--- {f['filename']}\n{f.get('patch', '')[:3000]}" for f in files)[:20000]
review = ai.generate(f"Guidelines:\n{guide}\n\nPR: {pr['title']}\n{pr['body'] or ''}\n\nDiff:\n{diff}",
system="Review this pull request against the guidelines. Be specific and brief; list issues as bullets.",
max_output_tokens=800).text
gh("POST", f"/repos/{REPO}/issues/{pr['number']}/comments", json={"body": f"**Automated review**\n\n{review}"})
reviewed.add(pr["number"])
state.set("reviewed", sorted(reviewed)[-500:])
return {"reviewed": len(prs)}FAQ
Common questions
Does the AI review block merging?
Can it skip draft pull requests?
Is my code sent to a third party AI provider?
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
Write GitHub release notes from commits
When a new tag appears, readable release notes are written from the commits since the last tag and published on the release.
See how it worksLabel new issues and flag duplicates
New issues are labelled as a bug, feature or question, and likely duplicates get a comment pointing to the original.
See how it worksAssign new issues automatically
New issues get an owner based on their label, and anyone can take an issue by commenting /assign.
See how it worksKeep exploring
Set up “Get an AI review on every new pull request” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.