To automatically show commit messages in YouTrack on an integrated project in Bitbucket, you will need to set up a webhook in Bitbucket that sends notifications to YouTrack when a new commit is made. Here are the steps to do this:
- In YouTrack, go to the project that you want to integrate with Bitbucket and navigate to the Administration area.
- Under the Integrations section, select the Bitbucket option and enter the URL of your Bitbucket repository.
- Click the "Generate a new link" button to generate an integration token. Copy the token to your clipboard.
- In Bitbucket, go to the repository that you want to integrate with YouTrack and navigate to the Settings page.
- Under the Webhooks section, click the "Create webhook" button.
- Enter a name for the webhook, such as "YouTrack Integration".
- In the URL field, enter the URL for the YouTrack REST API. The URL should look like this: https://<your-youtrack-domain>/api/issues?fields=idReadable. Replace <your-youtrack-domain> with the domain name of your YouTrack instance.
- In the "POST Content" section, select "application/json".
- In the "Secret" field, enter the integration token that you copied from YouTrack.
- In the "Triggers" section, select "Push".
- Click the "Create" button to save the webhook.
With the webhook set up, YouTrack will automatically receive notifications whenever a new commit is made in the Bitbucket repository. The commit message will be added as a comment to the relevant issue in YouTrack, provided that the commit message includes the issue ID in the format #<issue-id>.