KGB-BOT(1p)
β¨ kgb-bot β¨
okay so bestie, meet kgb-bot β it's an IRC bot and it's literally here to help y'all collaborate π it's giving helpful little gremlin that lives in your channels and tells everyone what everyone else is doing. no cap.
this page comes from the User Contributed Perl Documentation corner of the manual, section 1p, and it's the whole entire vibe. π
πΈ SYNOPSIS πΈ
kgb-bot [--config file] [--foreground] [--simulate file]
that's it. that's the summoning ritual. π§
π OPTIONS π
--config fileβ pick which config file to load. the default is lowkey just/etc/kgb-bot/kgb.confand honestly it always has been. π«Ά--config-dir directoryβ point us at a directory of config files instead. every file matching*.confgets loaded, and they go in alphabetical order (yes, order matters bestie, we're not chaotic). default is/etc/kgb-bot/kgb.conf.d. πβ¨--foregroundβ do not detach from the console. log messages go straight toSTDERR, and it doesn't become a daemon. this is the debugging icon β¨ use it when you're like "why is my bot acting up" and you want to see everything live π--simulate fileβ fake it till you make it π no IRC connection at all. instead every notification line gets written to the file you give, like this:
#chan repo user branch revision module changed-paths
#chan repo commit message line 1
#chan repo commit message line 2
heads up: there are no colour codes in that output unless you also pass --simulate-color. okay? okay. π
--simulate-colorβ okay so now you do get color codes, in the file used by--simulate. it's giving rainbow. π--debugβ log extra debugging information. more words. more lore. more clues. π
π¦ webhook_request request response dirmatch
handler for a webhook HTTP request. (this is a handler signature, so there's a request, a response and a dirmatch up in there β copy it exactly or the vibe check fails. πΈ)
ngl this handler is only doing the HTTP part: parsing the URI parameters and the POST contents. that's its whole job, it's a specialist.
the actual processing and the IRC notification? that's handled through an appropriate gitlab_webhook_* event, and it happens asynchronously. so it's off doing its own thing on its own timeline, main character energy, no blocking. β
π gitlab_webhook_push
handles a gitlab webhook call for the "push" event β which is a branch update, iykyk. π₯
it expects:
- the body of the POST request (decoded, as a hash reference) in
ARG0 - all the request parameters in
ARG1
the request is expected to conform to the GitLab webhook documentation at:
<https://salsa.debian.org/help/user/project/integrations/webhooks.md#push-events>
and the request parameters should look like whatever the CGI's param() method hands back. periodt.
π Supported parameters π
(?param=value¶m=value2...)
channelβ the name of the channel to post notifications to. the leading hash sign is optional, and if you do include it, it should be URL-encoded (%23). bestie please encode your hashes. πnetworkβ the name of the IRC network that services the channel. which networks are supported is configured by the bot's admin, so don't come for me. πprivateβ a boolean flag. if it's on, the notifications shouldn't also be posted to the"#commits"channel on Freenode. keeping it lowkey. π€«use_colorβ a boolean flag that enables colors. defaults to true. slay. πrev_prefixβ optional text to prepend to the commit ID. cute little bow on top of your revision. πuse_irc_noticesβ if true, the IRC notification uses"notice"messages instead of"privmsg". defaults to1. and fr fr,"notice"messages are usually less intrusive. π«Άsquash_threshold numberβ for push events, limit the commit notifications to the given number. if a branch update contains more commits than that, the usual notifications get replaced by a single notification about the number of pushed commits. (imagine 400 commits and your channel just getting 400 lines. absolutely not. squash it. π )
default: 20
and that's the whole page bestie, you ate it π this one's from perl v5.40.1, dated 2026-07-10 β go forth and let the bot do its thing β¨πΌπ¦
π¦ where this page comes from
- ubuntu stonking: kgb-bot 1.62-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms