A Node.js application that integrates Sentry with YouTrack, allowing Sentry issues and alerts to be automatically created and updated in YouTrack.
Brought to you by IT-Hock
This project is in early development and may not be fully functional. Use at your own risk. We suggest to NOT use this in production. There be dragons.
Please see the Issues for all features that are not yet implemented.
- Receive and process Sentry webhooks
- Create YouTrack issues from Sentry errors
- Link Sentry issues to YouTrack issues
- Handle Sentry alert rule actions
- Verify Sentry webhook signatures for security
- Node.js 18 or higher
- npm
- Docker and Docker Compose (for containerized deployment)
- YouTrack instance with API token
- Sentry instance (self-hosted or cloud)
-
Clone the repository:
git clone https://github.com/IT-Hock/sentry-yt.git cd sentry-yt
-
Install dependencies:
npm install
-
Create a
.env
file in the project root with the following variables:NODE_ENV=development HOST=0.0.0.0 PORT=3000 YOUTRACK_BASE_URL=https://youtrack.example.com YOUTRACK_TOKEN=your-youtrack-token
-
Start the development server with hot-reload:
npm run watch
-
Build and run with Docker:
npm run docker:build npm run docker:run
-
Alternatively, use Docker Compose:
npm run docker:compose:up
-
Generate a permanent token in YouTrack with the following permissions:
- Read/write access to projects and issues
- Read access to users and groups
-
Add the token to your
.env
file asYOUTRACK_TOKEN
.
- In your Sentry project, go to Settings > Integrations > Integrations.
- Find the "WebHooks" integration and add it.
- Configure the webhook URL to point to your deployed application's
/sentry/webhook
endpoint. - Configure the events you want to trigger the webhook.
The host on which the application will list.
localhost
The port on which the application will listen.
3000
If set to true
, the application will skip the signature verification for Sentry Webhooks.
This is not recommended for production environments.
false
If set to true
, the application will skip the installation verification for Sentry Webhooks.
This is not recommended for production environments.
false
The client secret for the Sentry application. This is used to verify the signature of incoming requests.
A mapping of Sentry installation IDs to YouTrack project IDs. This is used to determine which YouTrack project to create issues in based on the Sentry installation ID.
INSTALLATION_ID:PROJECT_ID:SENTRY_FIELD_ID;INSTALLATION_ID:PROJECT_ID:SENTRY_FIELD_ID
In the example below we have two installations one which maps to the YOUTRACK
project and one which maps to the DEMO
project.
Both use the same custom field id 500-11
which is the Sentry Issue ID
field (created earlier).
022627fb-0a95-43af-868a-02b8c24e5248:YOUTRACK:500-11;a2ff916a-1f61-4be0-8b34-45aae4262b12:DEMO:500-11
The base URL of your YouTrack instance. This should include the protocol (http or https) and the domain.
https://youtrack.example.com
The API token for your YouTrack instance. This should be a permanent token with read/write access to projects and issues.
If set to true
, the application will ignore SSL certificate errors. This is useful for development environments or environments with self-signed certificates.
The application exposes the following endpoints:
GET /
- Returns basic API informationGET /sentry
- Returns information about Sentry-related endpointsGET /sentry/members
- Member-related endpointsGET /sentry/issues
- Issue-related endpoints
Additional endpoints that may be available in future versions:
/sentry/setup
- Setup-related endpoints/sentry/webhook
- Webhook handling endpoints/sentry/options
- Options-related endpoints/sentry/alert-rule-action
- Alert rule action endpoints
npm run build
The compiled output will be in the dist
directory.
npm test
After the release workflow completes, you can pull the Docker image from GitHub Container Registry:
docker pull ghcr.io/it-hock/sentry-yt:latest
# or with a specific version
docker pull ghcr.io/it-hock/sentry-yt:1.0.0
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Please read SECURITY.md for details on our security policy and how to report security vulnerabilities.