Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Latest commit

 

History

History
56 lines (46 loc) · 2.39 KB

README.md

File metadata and controls

56 lines (46 loc) · 2.39 KB

MAGBot - Do ALL the things!

This is the collection of custom Errbot plugins that MAGFest uses to run our Slack ChatOps.

Getting Started

Test Slack Environment

  • If you have an @magfest.org email address, you can create an account on our test Slack workspace
  • If you don't have an @magfest.org email address, you can request an invite to our test workspace in the #devops channel on Slack

Test Bot Account

  • On the Custom Integrations page, click on the "Bots" integration
  • On the "Bots" page, click the "Add Configuration" button
  • Give your bot a recognizable username, like "magbot-yourusername"
  • Make a note of your bot's username and API token

Local Dev Environment

  • Install docker
  • Clone the magbot repository:
git clone https://github.com/magfest/magbot.git && cd magbot
  • Run magbot using the run-dev.sh script with your bot's username and API token:
./run-dev.sh magbot-username xoxb-XXXXXXXXXXXX

Local Dev Environment (Docker Compose)

  • Install docker
  • Clone the magbot repository:
git clone https://github.com/magfest/magbot.git && cd magbot
  • Copy the env.sample file to .env
  • Edit .env and add your bot's username and API token.
  • !!! VERY IMPORTANT !!! Do NOT put your login info into env.sample.
  • Run magbot with
docker-compose up

Developing

  • You can customize your local configuration by copying config-example.py to config.py and editing it
  • You can now interact with your local magbot on the test Slack workspace
  • In a DM with your magbot, type !help to get a list of commands
  • As you make changes in the local copy of your plugin, you can type !plugin reload MyPluginName to make your changes live

Testing

You can run the unit tests using tox.

Contributing

If you'd like to contribute, please open a pull request! Any new features should include at least some basic unit tests that exercise the code. Pull requests without unit tests – or with failing unit tests – will not be reviewed or considered for acceptance.