App::KGB::API(3pm)

πŸ’– App::KGB::API πŸ’–

okay bestie, sit down, hydrate, because this is the KGB bot API documentation and it's literally the blueprint for how your client talks to the bot. no cap, it's kind of iconic.


✨ VERSION 4 (JSON) ✨

🫢 General, authentication

So Version 4 rolls with JSON-RPC, exactly as described over at <http://http://json-rpc.org/wiki/specification> β€” with one lil extension. periodt.

And because every single request has to be authenticated (no sneaking in, we don't do that here), you gotta include two HTTP headers:

X-KGB-Project: project-name
X-KGB-Auth: hash

Let's break it down 🌸

  • The project name is the string that identifies the project on the server side, iykyk.
  • The hash is the hexadecimal representation of the SHA-1 hash calculated over the following data:
    • Project password β€” this is the shared password, the one both the client and the server know. 🀝
    • project-name
    • request-text β€” this is the JSON-encoded request text. the exact same thing that gets sent in the HTTP body, bestie. same text, no remix.

πŸŽ€ Commit notification

The request is a JSON-RPC call to a method called commit_v4, and it takes a single argument: a map with these possible keys:

  • repo_id β€” project-name
  • rev_prefix β€” revision-prefix. usually just "r" for Subversion commits, classic.
  • commit_id β€” commit id. this is the Subversion revision, the Git hash, or just totally empty (that's the CVS situation πŸ™ˆ).
  • changes β€” changes list. a list of changes, encoded as strings. each one is a simple file name prepended with "(A)" for added, "(M)" (or literally nothing) for modified, and "(D)" for deleted. go check out App::KGB::Change for the deets. πŸ’…
  • commit_log β€” log message
  • author β€” user/name
  • branch β€” branch name
  • module β€” module name
  • extra β€” additional information. a map with extra info. currently "web_link" is the only member that the server recognises. that's it, that's the whole list.

πŸ’Œ Plain message relay

The message relay calls go to the relay_message method, and the only argument is the message to be relayed. simple. clean. slay. ✨


🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Damyan Ivanov dmn@debian.org


Copyright (C) 2012 Damyan Ivanov

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


and that's the whole thing, bestie πŸ¦‹ this was App::KGB::API, shipped with perl v5.40.1, dated 2026-07-10, under the App::KGB::API(3pm) manual. mwah πŸ’‹ go forth and authenticate responsibly. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from