GitHub PR Review (webhook)

Set up a Hermes agent that reviews GitHub pull requests via a webhook, so review comments appear on a PR within seconds of it being opened and re-requests only re-review newly changed files.

Hermes Advanced Copied: 0
1 resource

Requirements

  • A terminal tool (for gh).
  • A custom review skill.
  • A webhook route in config.yaml.
  • A public endpoint with TLS.

How to use

Always verify the signature: the secret field in the route config must match GitHub's webhook secret, and the gateway validates X-Hub-Signature-256 before dispatching. Limit the route to the specific repo events you care about, so an unsigned or wrong-repo payload is rejected early. The agent still runs with full skill permissions, so don't wire a webhook route to a skill that can push code or close issues unless that's exactly what you want.

Limit the route to the specific repo events you care about — an unsigned or wrong-repo payload should be rejected early.

The agent still runs with full skill permissions. Don't wire a webhook route to a skill that can push code or close issues unless that's exactly what you want.

  1. Add a webhook route in Hermes's config.yaml under platforms.webhook.extra.routes:
   platforms:
     webhook:
       extra:
         routes:
           github-pr-review:
             secret: ${GITHUB_WEBHOOK_SECRET}
             prompt: |
               A PR event fired. Validate the payload, extract the PR
               number and repo, run gh pr diff, review against the
               pr-review skill, and post a review comment. If the
               event is a synchronize, only re-review the newly
               changed files.
             skills: [pr-review]

  1. Expose the gateway publicly. Options: a reverse proxy on your VPS (Caddy or nginx) with TLS in front of the gateway port, or a tunnel service for testing (Tailscale Funnel, Cloudflare Tunnel).
  2. In your GitHub repo settings → Webhooks, set the Secret to the value you put in GITHUB_WEBHOOK_SECRET, and for Events select Pull requests (and Pull request reviews if you want reply-to-reply).

Prompts: before connecting GitHub, test the route with a signed curl.

Test the route with a signed curl before connecting GitHub:

BODY='{"action":"opened","pull_request":{"number":1},"repository":{"full_name":"YOUR_ORG/YOUR_REPO"}}'
SIG=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$GITHUB_WEBHOOK_SECRET" | awk '{print "sha256="$2}')

curl -X POST https://your-host/webhook/github-pr-review \
  -H "Content-Type: application/json" \
  -H "X-Hub-Signature-256: $SIG" \
  -d "$BODY"

Source: aliaihub/awesome-hermes-usecases and its contributors. License: CC-BY-4.0. Source license notice.

Translation and editorial adaptation by ClawCases.

>Resources

>Related Use Cases

>More at this level: Advanced