# Daily reminders for pull requests waiting on review

Source: https://clickruntime.com/use-cases/stale-pull-request-reminders

> Your assistant builds a weekday check of your repos that finds pull requests open for more than a day without a review and posts them to your team's channel, tagging the requested reviewers.

## Can Claude remind my team about pull requests waiting for review?

Claude or another coding assistant can list open pull requests when you ask, but it won't check every morning by itself. With ClickRuntime connected, the assistant sets up a weekday automation that calls GitHub's API, finds pull requests waiting longer than your limit, and posts them to Slack with the reviewers named.

### Why the assistant can't do this on its own

- Nobody asks the assistant every morning; the point is that the reminder arrives without being asked.
- The check needs a GitHub token and a Slack connection that persist. ClickRuntime keeps both outside the chat.
- GitHub doesn't send an event for “still waiting”. Only a scheduled check can find it.

## Set it up from your AI assistant

Prompt to copy:

> Create a ClickRuntime automation: every weekday at 9:30 Berlin time, find pull requests in acme/app and acme/api that are not drafts, have been open more than 24 hours and have no review yet. Post them to #eng in Slack with the title, age, author and requested reviewers. Post nothing if there are none.

1. **Connect ClickRuntime to your assistant.** Add ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
2. **Paste the prompt.** Start a new chat and paste: “Create a ClickRuntime automation: every weekday at 9:30 Berlin time, find pull requests in acme/app and acme/api that are not drafts, have been open more than 24 hours and have no review yet. Post them to #eng in Slack with the title, age, author and requested reviewers. Post nothing if there are none.” Change the details (times, channels, addresses) to yours.
3. **Read the draft.** The assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
4. **Connect accounts and save keys.** The assistant asks you to save a fine-grained GitHub token with read access to pull requests on those repos as GITHUB_TOKEN in the ClickRuntime dashboard, and to connect Slack for notifications.
5. **Test it.** The assistant runs it now and shows the message it would post, then turns the schedule on.
6. **Turn it on.** The assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
7. **Check it in the ClickRuntime dashboard.** Each weekday run shows how many pull requests were waiting. Days with none post nothing. The schedule, next run times and the script are on the automation's page.

Connector setup for each assistant: https://clickruntime.com/assistants

## What the assistant writes

`stale_prs.py`

```python
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, notify

REPOS = ["acme/app", "acme/api"]
MAX_HOURS = 24

@on_trigger
def run(event):
    token = credentials.secret("GITHUB_TOKEN")
    gh = {"Authorization": "Bearer " + token, "Accept": "application/vnd.github+json"}
    now = datetime.now(timezone.utc)
    lines = []
    for repo in REPOS:
        prs = http.get(f"https://api.github.com/repos/{repo}/pulls", headers=gh,
                       params={"state": "open", "per_page": 100}).json()
        for pr in prs:
            if pr["draft"]:
                continue
            age = (now - datetime.fromisoformat(pr["created_at"].replace("Z", "+00:00"))).total_seconds() / 3600
            if age < MAX_HOURS:
                continue
            reviews = http.get(pr["url"] + "/reviews", headers=gh).json()
            if reviews:
                continue
            who = ", ".join("@" + r["login"] for r in pr["requested_reviewers"]) or "no reviewer set"
            lines.append(f"• <{pr['html_url']}|{pr['title']}> ({repo}, {int(age)}h, by {pr['user']['login']}) waiting on {who}")
    if not lines:
        return {"summary": "Nothing waiting"}
    notify.slack("Pull requests waiting for review:\n" + "\n".join(lines), channel="#eng")
    return {"waiting": len(lines)}
```

- A pull request counts as waiting when it's not a draft, older than 24 hours and has no review at all.
- Slack's <url|title> format makes each title a link.
- This is a report that does the same check every time, not a polling script, so it doesn't call report_fetched.

## A schedule, not a trigger link

Use a schedule: weekdays at a time the team starts work. GitHub sends no event for a pull request that's simply waiting.

For a ping the moment a review is requested, add a trigger link for pull_request events as well (see the GitHub webhooks guide).

## Limits

- The GitHub API returns up to 100 open pull requests per page; the assistant adds paging for busier repos.
- Slack usernames aren't GitHub usernames; map them in the script if you want real Slack mentions.

## Troubleshooting

### It reports pull requests that have reviews.

Reviews requested again after changes still count as reviewed in this version. Ask the assistant to treat “changes requested and updated since” as waiting.

### A repo returns 404.

The token can't see that repo. Add it to the fine-grained token's repository list.

## Related

- [GitHub automations](https://clickruntime.com/apps/github)
- [Slack automations](https://clickruntime.com/apps/slack)
- [Linear automations](https://clickruntime.com/apps/linear)
- [get-a-scheduled-digest-of-new-pull-requests](https://clickruntime.com/templates/get-a-scheduled-digest-of-new-pull-requests)
- [review-requests-waiting-on-me](https://clickruntime.com/templates/review-requests-waiting-on-me)
- [React to GitHub events](https://clickruntime.com/use-cases/github-webhooks)
- [Daily standup in Slack](https://clickruntime.com/use-cases/daily-standup-in-slack)
- [Recurring reminders](https://clickruntime.com/use-cases/recurring-reminders)
- [GitHub Actions cron alternative](https://clickruntime.com/alternatives/github-actions-cron)
- [Assistant scheduled tasks alternative](https://clickruntime.com/alternatives/chatgpt-claude-scheduled-tasks)
- [Docs: connections-and-secrets](https://clickruntime.com/docs/connections-and-secrets)
- [Docs: caretaking](https://clickruntime.com/docs/caretaking)

## Extend it: what you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

- **Mention reviewers by their Slack handle** (Multi-step logic)
  Prompt: "Change my PRs waiting on review automation so it mentions reviewers in Slack using this mapping: octocat → @maya, hubot → @sam."
- **Add a one-line AI summary of what each pull request changes** (Built-in AI)
  Prompt: "Change my PRs waiting on review automation so each line includes a one-sentence summary of the pull request description."
- **Escalate pull requests that appear three days running** (Memory between runs)
  Prompt: "Change my PRs waiting on review automation so it remembers how many days each pull request has been listed and marks those on day three with ⚠️."
- **DM each reviewer instead of posting in the channel** (Any app or API)
  Prompt: "Change my PRs waiting on review automation so it sends each reviewer a direct message in Slack with only their pull requests."
- **Thank reviewers in the channel when a waiting pull request gets reviewed** (Trigger links)
  Prompt: "Add a GitHub webhook to my PRs waiting on review automation: when a listed pull request gets its first review, post a thank-you in #eng."
- **A Friday summary of review times for the week** (Schedules)
  Prompt: "Add to my PRs waiting on review automation: every Friday at 16:00, post the average time to first review this week per repo."

## Questions

### Does it work with GitLab or Bitbucket?

Yes, through their APIs. Save a token as a secret in the ClickRuntime dashboard and ask your assistant to read open merge requests or pull requests from that service instead of GitHub.

### Can Claude check our pull requests every morning?

With ClickRuntime connected, yes. Claude sets up a weekday automation that checks GitHub and posts to Slack, without anyone opening a chat.

### Does it need a GitHub app?

No. A fine-grained personal access token with read access to pull requests is enough, saved in the ClickRuntime dashboard.

### Can it cover several repos or an organisation?

Yes. List the repos, or ask for every repo in the organisation that the token can read.

### Does it work with GitLab?

Yes, through GitLab's API with a token saved as a secret. Ask your assistant for GitLab merge requests instead.
