Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.34 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.34 KB

watch-octocat

GitHub can work together with Discord to help keep you up-to-date on your repos commits using Webhooks. However, this method only works on repos you own. Sometimes I want to keep up-to-date on a repository I don't own. If there's a simpler way than how I've done it here, feel free to chastise.

How it looks

(image of what a usual commit looks like)

Note, this format is a different design than the usual GitHub Webhooks you can set up for the repositories you own. The design was not meant to be a perfect replicate but rather a decent one in its own right.

Setup

Go into config.py and write what repos you want to watch and where you want to send them:

WATCH = {
   ("owner", "repo"): "discord webhook url", # first repo
   ("owner", "repo"): "discord webhook url", # second
   ... # etc.
}

Then run watch-octocat.py with Python 3.6 or above.

Add your username and a personal access token to reduce your rate limit for GitHub's API.

Notes

There are likely still bugs I need to sort out. (Sorrynotsorry)