Creating Internal Integration in Sentry:
- Go to Organization Settings -> Developer Settings, click on "Create New Integration"
- Give it any name you want
- Webhook URL should point to your Flask server (main.py)
- Turn on the Alert Rule Action
- Copy the content of ticket_schema.json from this repository and paste it inside the Schema field
- Under permissions: Issue & Event = Read & Write
- Under Webhooks mark only the issue checkbox
- Copy the token and paste it into SENTRY_AUTH_TOKEN in main.py
- Copy the client secret and paste it into SENTRY_CLIENT_SECRET in main.py
- Save the changes
Setting up the webhook environment:
Commands for installing Flask:
python3 -m venv venv
. venv/bin/activate
pip install Flask
Command for installing JIRA Python SDK:
pip install jira
Before you start the Flask server make sure to run:
. venv/bin/activate
Command for starting the Flask server:
flask --app main run