Skip to Content
Tares

How do I send GitHub commits and pull requests to an AI SRE?

Tares receives GitHub commits and pull requests through the github connector, polled with a personal token or pushed as webhooks by the GitHub App. Pick the App for events as they happen across every repository it is installed on, or a token for one polled source per repository. Both produce the same events, so your triggers keep working if you switch from one to the other.

How it works

You pick a credential on the GitHub connector, and Tares decides how events arrive.

  • GitHub App (recommended). GitHub delivers events by webhook as they happen. You get pull requests, pushes, reviews, review comments, comments, issues, releases and CI runs. One github source covers every repository the App is installed on.
  • Personal token. Tares polls every 2 minutes by default. You get commits, and pull requests opened, merged or closed. You add one source per repository.

Every event carries labels such as repo, action, number, author, branch, sha, url and title, where they apply. The key is owner/repo#number for pull requests and owner/repo for commits and pushes, so each change lands on the entity it belongs to.

With the App, every delivery is checked against the App’s webhook secret before anything is stored. An unsigned or wrongly signed request gets a 401. A delivery GitHub sends twice is stored once.

If you also want Vercel logs next to your GitHub changes, a Vercel log drain reaches Tares through the separate vercel source. It makes one event per log entry, keyed by project, with environment and source as labels. See Vercel logs.

Set it up

Choose the path that fits.

Option 1: the GitHub App on Tares Cloud

  1. In your workspace settings, choose Connect GitHub.
  2. Pick the organization and the repositories, and confirm on GitHub. Your workspace gets a github source carrying every event of those repositories.

Option 2: the GitHub App on a self-hosted Tares

  1. Open Settings > GitHub and choose Create GitHub App.
  2. Enter the GitHub organization, or leave it empty for your own account. Check that the address is how GitHub reaches this Tares.
  3. Choose Continue on GitHub and confirm the App with its permissions and events.
  4. Back in Tares, choose Install on GitHub, pick the repositories, and install.
  5. Make Tares reachable from the internet. A local tares up is not, so run a tunnel and use its address as the public URL:
cloudflared tunnel --url http://localhost:8787 TARES_PUBLIC_URL=https://<your-tunnel>.trycloudflare.com tares up

You can create the App before the tunnel exists. Deliveries start once Tares is reachable.

Option 3: a personal token

  1. Create a fine-grained token on GitHub with your repositories and these permissions: Metadata read, Contents read, Pull requests read. A classic token needs the repo scope for private repositories.
  2. Open Settings > GitHub, choose Add a personal token, and paste it.
  3. Choose Sources > Add source > GitHub, pick the credential and the repository, and save. Repeat for each repository.

The source looks like this:

- name: checkout-api connector: github poll: 2m config: repo: acme/checkout-api credential: github labels: - { name: repo, field: repo, primary: true }

The first poll imports recent commits and no old pull requests. For GitHub Enterprise, set api_url. To follow a branch other than the default, set branch.

Then add a trigger

This trigger fires once per merged pull request in two repositories:

- name: pr-merged sources: [github] filters: - { field: event_type, op: eq, value: pull_request } - { field: action, op: eq, value: merged } - { field: repo, op: in, value: [acme/checkout-api, acme/payments] } condition: { aggregate: count, predicate: "> 0", window: 5m } cooldown: 5m

Optional: Vercel log drain

  1. Add a vercel source and copy its ingest URL.
  2. In Vercel, open Team Settings → Log Drains → Add Log Drain, set the endpoint to that URL and the delivery format to JSON.
  3. Make sure the endpoint is publicly reachable, because Vercel delivers from its cloud.

What you get

  • Pull requests and commits arrive as events keyed to the repository or pull request, ready for triggers and correlation.
  • With the App, you also get pushes, reviews, comments, issues, releases and CI runs from every installed repository in one source.
  • The same event_type and label names work on both paths, so switching from a token to the App does not break a trigger.
  • Filters on event_type or action over a GitHub source offer their values to pick from in the console’s trigger editor.
  • Pull request events carry action values such as opened, merged and closed. A closed pull request that merged reads merged.
  • With Vercel connected too, log entries sit next to your changes, each keyed by project and labeled with environment and source.

When something else fits

  • Use a token when you cannot install an App. It is simple, but it polls every 2 minutes and reports only commits and pull requests opened, merged or closed. A pull request reopened between two polls is not reported.
  • Use the App when you want more than commits and pull requests. Reviews, issues, releases and CI runs only arrive with the App, and agents can post check runs only with it.
  • Check the token’s permissions if pull requests are missing. If it lacks Pull requests read, commits still arrive but pull requests do not.
  • Use the Vercel drain for runtime and build logs, not for GitHub data. It carries log entries from your projects. It does not carry commits or pull requests, so pair it with the GitHub source rather than replacing it. See the Vercel connector for its prerequisites.
  • Troubleshoot the App first. If nothing arrives, confirm Tares is reachable at the App’s address and that the App is installed on the repository. A 401 means the webhook secret does not match, so reconnect from Settings > GitHub.

Still stuck? Get help

Last updated on