2023-06-18 13:12:27 +01:00
|
|
|
![](branding/logo.png)
|
|
|
|
|
2022-11-08 08:19:32 +00:00
|
|
|
gitea-irc-bot
|
|
|
|
=============
|
|
|
|
|
2023-06-25 18:32:58 +01:00
|
|
|
![DUB](https://img.shields.io/dub/v/gitea-irc-bot?color=%23c10000ff%20&style=flat-square) ![DUB](https://img.shields.io/dub/dt/gitea-irc-bot?style=flat-square) ![DUB](https://img.shields.io/dub/l/gitea-irc-bot?style=flat-square)
|
2023-06-25 18:31:03 +01:00
|
|
|
|
|
|
|
|
2023-06-13 14:00:50 +01:00
|
|
|
![](demo.png)
|
|
|
|
|
2022-11-13 18:31:50 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
### Webhook setup
|
2022-11-08 08:19:32 +00:00
|
|
|
|
|
|
|
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":
|
2022-11-13 18:31:50 +00:00
|
|
|
* `Push`
|
|
|
|
|
|
|
|
### Building
|
|
|
|
|
|
|
|
Simply clone the repository with:
|
|
|
|
|
|
|
|
```bash
|
2023-03-11 14:02:18 +00:00
|
|
|
git clone https://github.com/deavmi/gitea-irc-bot
|
2022-11-13 18:31:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Then run the following command to build the library:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
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:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"irc" : {
|
2023-06-13 14:07:00 +01:00
|
|
|
"host": "irc.freenode.net",
|
2022-11-13 18:31:50 +00:00
|
|
|
"port": 6667,
|
|
|
|
"nickname": "tlangbot",
|
|
|
|
"realname": "TLang Development Bot",
|
2023-07-04 17:01:10 +01:00
|
|
|
"channels": {
|
|
|
|
"tlang" : "#tlang",
|
|
|
|
"repoName" : "#destinationChannel"
|
|
|
|
}
|
2022-11-13 18:31:50 +00:00
|
|
|
},
|
|
|
|
"ntfy": {
|
|
|
|
"endpoint": "http://ntfy.sh",
|
2023-06-13 14:07:00 +01:00
|
|
|
"topic": "myTestFr"
|
2022-11-13 18:31:50 +00:00
|
|
|
}
|
|
|
|
}
|
2022-11-13 18:32:40 +00:00
|
|
|
```
|
|
|
|
|
2023-07-04 17:08:20 +01:00
|
|
|
You can run the program with `GIB_CONFIG=myConfig.json gitea-irc-bot` to specify a custom JSON configuration path other than the default.
|
2023-03-12 12:38:36 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
AGPL 3.0
|