Search code examples
gitlabversion-controlcommandyoutrack

Running commands in Youtrack from linked Gitlab commit messages


I have set up Youtrack and Gitlab locally and am trying to integrate the two.

This seems to work both ways, I can link Youtrack Issues in gitlab and Youtrack picks up those commit messages and adds them to the VCS history of the mentioned ticket.

However, I cannot run any commands by writing them into the commit messages

The problem

There are no complaints about non-matching VCS names or incorrect commands, like in some other cases I was able to find on google.

There isn't even a small "i" icon to tell me the state of any commands (Screenshot from a seperate test I performed with a cloud based youtrack and a different github account, which worked flawlessly first try)

working example

It's like it doesn't even try to parse the commit messages for commands at all. The integration settings are configured to run commands in the main Project and I'm definitely using that one.

Another weird thing is that he commits don't automatically appear on the Youtrack tickets. I always have to manually import them via the VCS integrations menu.

How can I get commands via VCS commit messages to work?

Tried all manner of ways to write the commands. With # or ^ in front of the ticket ID. None worked.


Solution

  • Commands don't apply when importing commits in bulk. Otherwise, it could lead to multiple unexpected changes or even overload your server depending on the number of commits that invoke a command. They work if commits are attached automatically.

    When a commit gets attached automatically, the following occurs: you make a commit → GitLab sends us commit data via a webhook → YouTrack parses the data and verifies your VCS settings → Adds the commit to the relevant issue if applicable. So the common reason when it doesn't work is that there's either an issue with the GitLab webhook or GitLab can't reach YouTrack.

    The webhook request and its status can be checked GitLab project settings → Webhook.