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.conf and honestly it always has been. 🫢
  • --config-dir directory β€” point us at a directory of config files instead. every file matching *.conf gets 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 to STDERR, 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&param=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 to 1. 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