You should setup the following webhooks on your Gitea instance:
HOSTNAME:PORT/issue- MIME type:
application/json - Method:
POST - Enable "Custom Events":
IssuesIssue LabeledIssue CommentIssue MilestonedIssue Assigned
- MIME type:
HOSTNAME:PORT/commit- MIME type:
application/json - Method:
POST - Enable "Custom Events":
Push
- MIME type:
Simply clone the repository with:
git clone https://github.com/deavmi/gitea-irc-botThen run the following command to build the library:
cd gitea-irc-bot
dub buildYou 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",
"username": "tbot",
"channels": {
"tlang" : "#tlang",
"repoName" : "#destinationChannel"
}
},
"ntfy": {
"endpoint": "http://ntfy.sh",
"topic": "myTestFr"
}
}Note: gitea-irc-bot will always look for a configuration file named config.json in the current working directory
An example configuration file appears as follows:
# Webhook configuration
export WEBHOOK__BINDADDRESS="0.0.0.0"
export WEBHOOK__PORT=8080
# IRC server
export IRC__HOST="pinewood.irc.bnet.eu.org"
export IRC__PORT=6667
export IRC__NICKNAME="GiteaBot"
export IRC__REALNAME="A Gitea bot written by deavmi"
export IRC__CHANNELS="tlang:#tlang;thing2:#thing2Chan"
export IRC__USERNAME="tbot"
# Ntfy.sh
export NTFY__ENDPOINT="http://ntfy.sh"
export NTFY__TOPIC="tlang_dev"Note: Specifying an environment variable will override the respective configuration parameter entirely.
AGPL 3.0
Thanks so much to selckin and BtbN on Libera IRC,
helped me with the GitHub Actions and fixing my erroneous
Dockerfile.