Skip to content

tfaughnan/ghirc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghirc

IRC bot for GitHub webhooks.

Dependencies

Configuration

Generate a secret token. Here is one way to do this:

$ python3 -c 'import secrets; print(secrets.token_hex(20))'

Create a config file at ~/.config/ghirc.toml (or anywhere, if you use the -c flag). For example:

[uvicorn]
host = "127.0.0.1"
port = 1337

[github]
secret = "0a04e05d0d7dc693ad3974c5abd8a98a0d4969ac"
events = ["create", "delete", "fork", "issue_comment", "issues",
          "ping", "pull_request", "push", "star"]

[irc]
host = "irc.libera.chat"
port = 6697
ssl = true
nickname = "ghirc"
realname = "https://github.com/tfaughnan/ghirc"
channels = []

Not all event possible event types are supported yet, just the most desirable ones.

Finally, create webhooks for your GitHub repositories. Set the payload URL to <your-domain>/webhooks, select application/json for content type, and input the secret you generated above.

Execution

The most basic way to run the bot is:

$ ./ghirc

There are other factors to consider when deploying ghirc. For example, you way wish to run it behind a reverse proxy or with a process manager. See Uvicorn's documentation on this subject.

About

IRC bot for GitHub webhooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages