UtilitiesDocs

GitHub Updates

Post a repository's pushes in a channel, as they happen.

#Overview

GitHub Updates posts what gets pushed to a repository in a channel of your choice. Each message shows who pushed, the commits with links to them, and the files they added, changed or removed. Public repositories work straight away, and private ones work once you connect your GitHub account.

#Getting started

  1. Add a repository. Run /github updates add with the repository as owner/name, or paste its GitHub link. Pick the channel to post in, or leave it out to use the one you're typing in.

  2. Wait for the next push. Nothing is posted for commits that were already there. The first message comes with the next push.

/github updates add repository:utilities-bot/transcripts channel:#updates

Type an account or organisation name, or paste its link, and the repository option suggests its public repositories to pick from.

#What gets posted

Utilities looks at the repository's default branch every couple of minutes. Each message is headed Updates for the repository, then says who pushed how many commits to which branch, lists the commits, and ends with a short summary of the files that changed.

  • One message per piece of work. If the same person pushes again within 10 minutes, Utilities adds the new commits to their last message instead of posting a new one.
  • Commits from bots are left out, like Dependabot or GitHub Actions.
  • Big pushes are spread out. If the commits don't fit in one message, they go over up to 3 messages. When file names don't fit, Utilities shows only how many files changed.
  • At most 3 messages per check. If lots of people push at once, the newest pushes are posted.
  • If the default branch is renamed, say from master to main, Utilities follows it.

#Private repositories

Utilities reads a private repository through its GitHub app. Two things have to be true before it will post one: the app is installed on that repository, and the person adding it can see the repository on GitHub. That's what stops someone from adding a private repository they don't have access to.

  1. Run the add command. For a private repository, Utilities answers that it "does not exist, or is private", with a Connect GitHub button under it.

  2. Connect your account. The button opens a page on utilities.best made for you and that repository. Press Continue with GitHub and sign in. If the app isn't installed on the repository yet, GitHub asks you to install it and pick the repository.

  3. Add it again. Back in Discord, run the same /github updates add command. This time it's added.

The connect link only works for 15 minutes, and your connection only counts for an hour, so add the repository again soon after connecting. Utilities never keeps your GitHub sign-in. Once the repository is added, it reads it through the app.

If a private repository is deleted, taken off the app's list, or the app is uninstalled, Utilities stops watching it on its next check and forgets it. Nobody has to remove it by hand.

#Hiding files with .updatesignore

Some changes aren't news, like editor settings or CI files. Put a file called .updatesignore at the top of the repository, on the branch Utilities watches, and list what to leave out. It's written like a .gitignore:

# tooling
.claude/
.github/
.vscode/
*.md
!CHANGELOG.md
  • A name with no slash, like .vscode or *.md, matches at any depth.
  • A path with a slash, like docs/internal or /README.md, is read from the top of the repository.
  • A slash at the end means a folder, and everything inside it.
  • * matches any run of characters in a name, ? matches one character, and ** matches any number of folders.
  • A line starting with ! puts a path back. The last line that matches wins.
  • Lines starting with # are comments.

A commit that only touches ignored files isn't posted at all. A commit that also touches something else is posted, and the ignored files are left out of the file list.

It's close to .gitignore but not the same: [a-z] ranges aren't supported, and a ! line can bring back a file inside a folder you left out. Only the first 100 rules are read.

#Good to know

  • You need Manage Server to use these commands.
  • To move a repository to another channel, run /github updates add again with the new channel. It doesn't count as a new repository.
  • A server can watch 1 repository on Free, 10 on Tier 1 and 25 on Tier 2. See Premium.
  • With the prefix, ,gh is a short way to write ,github.

#Commands

/github updates add (repository)Manage Server

Post a repository's pushes in a channel

/github updates remove (repository)Manage Server

Stop posting a repository's pushes Also: ,github updates delete

/github updates listManage Server

List watched repositories