Skip to content

make a github bot

Evan Feenstra edited this page Oct 14, 2021 · 2 revisions

Until we have bot creation in all the apps, you will need you manually add the DB row.

  • generate a unique id and secret for your bot
    • on mac: hexdump -n 16 -e '4/4 "%08X" 1 "\n"' /dev/urandom
  • connect to your DB ()
  • INSERT into sphinx_bots (id, secret, name) values ('RANDOM_ID', 'RANDOM_SECRET', 'Github');
  • find your tribe uuid (its in the connection string that you can copy from tribes.sphinx.chat)
  • make a Github Action pointing to your tribe. In your repository, make a directory called .github, and make a directory within that called workflows. Then make files for specific actions that take place in your repo.
  • example: issue_opened.yml
  • the last line of the file is where you can add your bot id, bot secret, text for the message, tribe uuid. Make sure its valid JSON!
Clone this wiki locally