errbot-plugin-sentry

#sentry #github #errbot #slack

errbot sentry github

📚 Documentation

This plugin is designed to be run inside an errbot-based bot installed in your Slack workspace. Its structure points to the Sentry Cloud, but apparently you just need to adjust the URLs in the sentry.py if your Sentry is hosted on-premise.

The idea is to give autonomy to any developer in an IT Engineering structure to create a project within Sentry instead of having to open a ticket and wait for the activity to be done. When invoked, the bot will:

  1. create a new project in Sentry based on input from a requester and already assign it to a previously created team
  2. if the Sentry organization has integration with Github, it will add the repository informed in this integration (to know more about this integration, click here)
  3. Return a DM (direct message) via Slack informing the DSN of the project in question to configure in your code.

⚙️ How its works?

As with all other plugins, the 'sentry.plug' and 'sentry.py' files must be placed inside the errbot's /plugins/ directory, as in the structure shown below:

|_ errbot
   |_ plugins
      |_ sentry
         - sentry.plug
         - sentry.py

It has been tested and validated on Slack with the following packages:

errbot slackclient websocket-client
6.1.7 1.3.2 0.54.0

You can use !about to check errbot version and pip list to check installed packages.

Environment Variables

To make this plugin usable for everyone, some environment variables need to be given to errbot.

Sintaxe

You must to pass two parameters in the command to your bot:

  • name of the project to be created within Sentry
  • team created within Sentry

Example: @your_bot sentry create project <your_project_name> for <your_sentry_team_name>

🔍 Results

If the variables, permissions, project name and team are correct the bot will create our project and respond successfully! ✅

errbot

errbot

⚠️ Attention: if you inform a repository that does not exist in your GitHub account or its integration between Sentry x Github is not done, the project will be created inside Sentry, but the second step of the plugin will fail. errbot

And finally, if you inform a Sentry team that doesn't exist, the bot will return to the requester informing you of the error and give a list of all teams created within the configured Sentry Organization. errbot

✍️ Contributing

Any contributions you make are much appreciated.