nagjo
An IRC bot for Forgejo.
nagjo forwards events from Forgejo. For instance, it posts a message when a pull request is opened. The following events are supported:
- Commits pushed
- Issue opened or closed
- Pull request opened, merged or closed
- Release published
nagjo expands references to issues and pull requests in messages. For
instance, posting fixed in #42 will reply with a link to that pull request.
A repository name or path can be included as well, e.g. nagjo#42 or
emersion/nagjo#42.
Usage
Create a configuration file:
listen localhost:8080
connect nagjo@irc.libera.chat
Run nagjo:
nagjo -config <path>
Configure your HTTP reverse proxy to forward requests to nagjo, then register a new webhook in the Forgejo project settings. Select the "Forgejo" webhook type and the events you're interested in.
Configuration
The scfg configuration file format is used.
connect <url>
Specifies IRC connection settings.
Example:
connect ircs://irc.libera.chat {
nickname nagjo
server-password hunter12
}
The URL follows one of these formats:
[ircs://]<host>[:port]connects with TLS over TCPirc+insecure://<host>[:port]connects with plain-text TCP
The following directives are supported:
nickname <nick>specifies the nicknameserver-password <pass>specifies the server password (PASS)
forgejo
Specifies Forgejo settings.
Example:
forgejo {
base-url https://codeberg.org/emersion
check-webhook-auth-token asdf
}
The following directives are supported:
base-url <url>specifies the base instance or user URL. Relative references in messages posted by users will be resolved relative to this base URL.check-webhook-auth-token <token>verifies authentication for incoming webhook requests with a token. Configure the Forgejo webhook authentication header withBearer <token>.
channel <name>
Per-channel configuration.
Example:
channel #nagjo {
repository foo user/bar org/* !org/baz
}
The above matches any repository named "foo", any repository named "bar" owned by "user", and any repository owned by "org" which isn't named "baz".
The repository <patterns...> directive specifies which repositories should
have their events sent to the channel. A pattern may be an absolute repository
URL, a repository path (<owner>/<name>) or a repository name. A pattern may
include * to match any path component. A pattern starting with ! excludes
matching repositories.
If a channel is configured with a single repository, nagjo will expand issue and pull request references in messages when they do not contain a repository name.
License
GPLv3 only
© 2026 Simon Ser