Gitea webhook-based IRC bot
Go to file
Tristan B. Velloza Kildaire ad26b04e1c
Merge pull request #4 from deavmi/safe_channel_associations
Safe channel associations
2023-10-24 18:43:07 +02:00
.github/workflows Create d.yml 2023-06-25 19:30:28 +02:00
branding Branding 2023-06-18 14:12:26 +02:00
source Gitea IRC Bot 2023-09-24 15:47:32 +02:00
.gitignore Updated .gitignore 2022-11-06 13:28:06 +02:00
LICENSE - Added LICENSE 2023-06-13 15:09:57 +02:00
README.md App 2023-07-04 18:08:20 +02:00
config.json Config 2023-07-04 12:13:31 +02:00
demo.png Added demo image to README 2023-06-13 15:00:50 +02:00
dub.json Dub 2023-10-24 17:01:34 +02:00

README.md

gitea-irc-bot

DUB DUB DUB

Usage

Webhook setup

You should setup the following webhooks on your Gitea instance:

  1. HOSTNAME:PORT/issue
    • MIME type: application/json
    • Method: POST
    • Enable "Custom Events":
      • Issues
      • Issue Labeled
      • Issue Comment
      • Issue Milestoned
      • Issue Assigned
  2. HOSTNAME:PORT/commit
    • MIME type: application/json
    • Method: POST
    • Enable "Custom Events":
      • Push

Building

Simply clone the repository with:

git clone https://github.com/deavmi/gitea-irc-bot

Then run the following command to build the library:

cd gitea-irc-bot
dub build

Configuring

You should have a config.json in the repository. You can now customize this to tweak settings for the bot.

An example configuration file can look as follows:

{
    "irc" : {
        "host": "irc.freenode.net",
        "port": 6667,
        "nickname": "tlangbot",
        "realname": "TLang Development Bot",
        "channels": {
            "tlang" : "#tlang",
            "repoName" : "#destinationChannel"
        }
    },
    "ntfy": {
        "endpoint": "http://ntfy.sh",
        "topic": "myTestFr"
    }
}

You can run the program with GIB_CONFIG=myConfig.json gitea-irc-bot to specify a custom JSON configuration path other than the default.

License

AGPL 3.0