Skip to content

On a schedule

Remind reviewers in Slack about open GitHub pull requests

Each weekday morning, reviewers with pull requests waiting more than a day are mentioned by name in a Slack channel.

Runs
On a schedule
Apps
GitHub, Slack
AI
Not needed
Access
Pull requests: read; users:read, users:read.email, chat:write

Send this to your assistant

Create a ClickRuntime automation: every weekday at 10am, find pull requests in acme/app waiting on a reviewer for more than 24 hours and post a reminder to #code-review mentioning each reviewer in Slack.

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

Pull requests stall most often while waiting for review, and a GitHub email that says "review requested" is easy to miss among dozens of notifications. Authors end up chasing reviewers in chat by hand.

Each weekday this automation lists open pull requests, finds the ones waiting on a requested reviewer for more than a day, and posts one message to your review channel. Each reviewer is mentioned in Slack, with the pull requests they owe and how long each has waited.

Engineering teams use it to keep review time short without a lead having to chase people, and authors stop having to ask for reviews themselves.

What you get out of it

  • Mentions that notify

    Reviewers are tagged by their Slack account, so the reminder reaches them the same way a teammate's message would.

  • Only stale requests

    Pull requests updated in the last 24 hours are left out, so fresh work is not nagged.

  • Drafts ignored

    Draft pull requests are skipped until they are marked ready.

  • One message, not many

    All reminders go into a single post, which keeps the channel readable.

  • Weekends off

    No reminders are sent on Saturday or Sunday.

How it works

What happens, step by step

  1. Each weekday morning the automation lists open pull requests that are not drafts.

  2. For each one it checks who has been asked to review and how long the request has been open.

  3. It matches GitHub users to Slack members by email, or by a mapping you provide.

  4. One message in the review channel mentions each reviewer with the pull requests they owe.

Before it runs live

  • Connect GitHub
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsOn a schedule
Remind reviewers in Slack about open GitHub pull requeststoday, 9:00Succeeded
#code-review · SlackPull requests waiting for review: @Kim Chen: Add Parquet export (#812), 2 days · Fix retry jitter (#815), 1 day @Vik Lee: Bump grpc to 1.66 (#809), 3 days

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 Google Sheets
  • Combine it with other GitHub and Slack 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.
remind_reviewers_in_slack_about_open_github_pull_requests.pyexample
import datetime
from clickruntime import on_trigger, credentials, http, notify

REPO = "acme/app"
CHANNEL = "#code-review"
HOURS = 24
GH_TO_EMAIL = {"kchen": "kim@acme.com", "vlee": "vik@acme.com"}

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

def slack_id(email):
    r = http.get("https://slack.com/api/users.lookupByEmail", params={"email": email},
                 headers={"Authorization": f"Bearer {credentials.connection('slack', 'work')}"}).json()
    return r["user"]["id"] if r.get("ok") else None

@on_trigger
def run(event):
    if datetime.datetime.utcnow().weekday() >= 5:
        return {"skipped": "weekend"}
    now = datetime.datetime.utcnow()
    owed = {}
    for pr in gh("GET", f"/repos/{REPO}/pulls", params={"state": "open", "per_page": 100}):
        if pr["draft"]:
            continue
        age = now - datetime.datetime.strptime(pr["updated_at"], "%Y-%m-%dT%H:%M:%SZ")
        if age.total_seconds() < HOURS * 3600:
            continue
        for r in pr["requested_reviewers"]:
            owed.setdefault(r["login"], []).append(f"{pr['title']} (<{pr['html_url']}|#{pr['number']}>), {age.days or 1} day{'s' if age.days > 1 else ''}")
    if not owed:
        return {"waiting": 0}
    lines = []
    for login, prs in owed.items():
        uid = slack_id(GH_TO_EMAIL[login]) if login in GH_TO_EMAIL else None
        lines.append(f"{f'<@{uid}>' if uid else login}: " + " · ".join(prs))
    notify.slack("Pull requests waiting for review:\n" + "\n".join(lines), channel=CHANNEL)
    return {"reviewers": len(owed)}

FAQ

Common questions

How are GitHub users matched to Slack people?
Through the email list in the script and Slack's users.lookupByEmail, which needs the users:read.email scope on your Slack app. Anyone not in the list is shown by GitHub username instead of a mention.
Does it count time from when the review was requested?
It uses the pull request's last update time, so a push or a comment resets the clock. That avoids nagging about a pull request the author just changed.
Can it send the reminder as a direct message instead?
Yes. Posting with the member ID as the channel sends it from your Slack app directly to that person. Ask your assistant to switch to one message per reviewer.
What permissions does it need?
Pull requests: read; users:read, users:read.email, chat:write. 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 “Remind reviewers in Slack about open GitHub pull requests” from your assistant

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