Templates

Weekly pull request digest routine

Every Monday, a summary of open pull requests, written by a bot that can only read.

Illustration of the app. Names and values come from this template.

The short answer

Create a digest bot, grant it the GitHub connector, allow only read, list and search tools, and deny every other GitHub tool for that bot. Run the digest prompt once in a chat, then make it a weekly routine. Routines run at most every 15 minutes, up to 20 per org, and pause after 10 failures in a row.

How to use this template

  1. Create a digest bot and grant it only the GitHub connector.
  2. Match the tool names below to your connector, scope the rules to the digest bot, and save them as an admin.
  3. Run the prompt once in a chat with the bot and check the result.
  4. Make it a routine with a weekly schedule, such as 0 9 * * 1 for 9am on Mondays in your own time zone.

The template

Copy it, then replace the values in angle brackets with your own.

Rules (scope each one to the digest bot):
[
  { "name": "Allow reads", "effect": "allow", "priority": 40, "tool_glob": "github__get_*" },
  { "name": "Allow lists", "effect": "allow", "priority": 40, "tool_glob": "github__list_*" },
  { "name": "Allow searches", "effect": "allow", "priority": 40, "tool_glob": "github__search_*" },
  { "name": "Deny everything else on GitHub", "effect": "deny", "priority": 100, "tool_glob": "github__*", "reason": "The digest bot only reads." }
]

Routine prompt:
List open pull requests in <owner>/<repo>. Group them as: waiting on review,
changes requested, approved, and no activity for 7 days. For each one give the
title, author, age and one line on what blocks it. End with the three to
unblock first.

Routine limits to know

Why a read-only bot

A digest only needs to read. Allowing lookups at priority 40 and denying the rest of GitHub at 100 means a confused run cannot comment, merge or push, and nothing waits for an approval that nobody is there to give. Scope the rules to the digest bot so other bots keep their own rules.

How the rules interact

Related reading

Questions

How often can a routine run?

At most every 15 minutes, with up to 20 routines enabled per org.

What happens if the routine keeps failing?

After 10 failures in a row it pauses, so a broken connection does not keep running.

Who does the routine run as?

The person who made it. The run posts the prompt as them.

Keep reading

Try Bello Bot with your team

Public beta. Bring your own model keys, invite your team, and approve what your bots do.