#sentry #github #errbot #slack
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:
- create a new project in Sentry based on input from a requester and already assign it to a previously created team
- 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)
- Return a DM (direct message) via Slack informing the DSN of the project in question to configure in your code.
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.
To make this plugin usable for everyone, some environment variables need to be given to errbot.
- GITHUB_ORG
- SENTRY_TOKEN
- SENTRY_ORG_SLUG
- [SENTRY_GITHUB_INTEGRATION_ID]
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>
If the variables, permissions, project name and team are correct the bot will create our project and respond successfully! ✅
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.
Any contributions you make are much appreciated.