Daily pull request review

Every weekday morning, an AI agent reviews your open pull requests against the repository conventions and posts its findings before the stand-up.

Reviews pile up while everyone is busy shipping. This workflow gives every open pull request a first pass before the team starts its day: an agent running on your machine reads the repository conventions (CLAUDE.md, AGENTS.md, CONTRIBUTING.md), reviews each diff and posts one comment per pull request, ranked by severity.

How it works

  1. The agent lists the open, non-draft pull requests with the GitHub CLI.
  2. It skips the ones it already reviewed at their latest commit, so a pull request is never reviewed twice.
  3. For each of the others, it looks for correctness bugs, security issues, missing tests and broken conventions, then posts a single review comment. It never approves, requests changes, pushes or merges.
  4. A summary of the morning lands in your SideHub Memory.

What you need

Steps

  1. 1. Review the open pull requests

    Review the open pull requests of the git repository in the current directory that target the `{{inputs.base_branch}}` branch.
    
    1. Check that the GitHub CLI works: `gh auth status` (it reads GITHUB_TOKEN). If it fails, fail the step with the reason.
    2. List the open, non-draft pull requests targeting `{{inputs.base_branch}}`, oldest first, at most {{inputs.max_prs}}:
       `gh pr list --base {{inputs.base_branch}} --state open --draft=false --json number,title,author,headRefOid,updatedAt`.
       If there are none, write a one-line summary and complete the step.
    3. Read the repository conventions first: CLAUDE.md, AGENTS.md, CONTRIBUTING.md and any linter or formatter configuration.
    4. For each pull request:
       - Skip it if a previous comment of yours ends with "Reviewed at <its head commit SHA>" (`gh pr view <number> --json comments,reviews`).
       - Read the description and the diff: `gh pr view <number>` and `gh pr diff <number>`.
       - Look for correctness bugs, security issues, missing tests and breaks of the repository conventions. Ignore style preferences the conventions do not mention.
       - Post one review comment with `gh pr review <number> --comment --body-file <file>`: a one-line verdict, then the findings ranked by severity, each with file:line, the problem and a suggested fix. End with "Reviewed at <head commit SHA>". Never approve, request changes, push commits or merge.
    5. Write the summary of the run in Markdown: each pull request reviewed with its verdict and number of findings, and the ones skipped and why.
       Complete the step with `--value reviewed=<number reviewed>`.

Secrets

Suggested schedule: Weekdays at 8:00

FAQ

Does the agent approve or merge pull requests?

No. It only posts review comments. Approving, requesting changes and merging stay with your team.

Where does the code go?

Nowhere. The agent runs on your own machine or server; SideHub only sees the run's status and the summary it writes.

Can I review another branch or limit the number of pull requests?

Yes. The base branch and the maximum number of pull requests are launch parameters, editable on each run or in the scheduler.

Use this template (free) ยท All templates