Youtrack workflow via Gitlab events

We encounter repetitive operations in task workflow. Workflow example:

1) task is assigned to dev

2) dev creates branch containing task id

3) dev logins to youtrack and changing state to In Progress

4) dev push commits

6) dev creates merge request and assigns someone for code review

7) dev logins to youtrack, change state to Code Review and assigns person who'll resolve the MR

8) reviewer merges branch to master

9) reviewer logins to youtrack and changes state to Ready and assign person who'll deploy

10) deployer creates version tag and deploys

11) deployer logins to youtrack and changes state to Done

Because the workflow is still same, automatization of state/assignee change would make our lifes a lot simpler.

Initially, I thought that this can be done via VCS Youtrack integration, but after reading few articles and your doc, it does not seem so. Youtrack's VCS is capable to show commits/MRs and parse commit messages as commands, but this requires strict syntax(means extra requirements for lazy developers) and worsens readability of commits. There is also possiblity to include custom workflow scripts, but it probably affects only loaded pages. So all clues lead to gitlab/git hooks. Basically what I want to accomplish:


Gitlab commit to branch containing task id

calls Youtrack's API,associate task id contained in commit msg and change State=In Progress, Assigne=Commiter


Gitlab create merge request -> master

calls Youtrack's API, associate task id contained in branch name and change State=Code Review, Assignee=MR Assignee

Gitlab close merge request -> master

calls Youtrack's API,associate task id contained in branch name and change State=In Progress, Assignee=previous Assignee


Gitlab merge branch -> master

calls Youtrack's API,associate task id contained in branch name and change State=Ready


Gitlab new version tag

calls Youtrack's API, get all tasks with State==Ready and change State=Done


I appreciate any suggestions. Thanks

Official comment

Hi Petr,

here's a feature request I can recommend you to vote:

Please comment and subscribe to it in our tracker to be notified of updates. Thank you!

Liubov Dievskaia Old issue but I have a question. The feature request you link to, is that released? If so, is now possible to do what Petr Schuchmann asks?

At my company we have similar requirements, we want to change state of YouTrack issue when an MR is merged in Gitlab. Would appreciate any insight into how that could be achieved.



I'm Sergey from the Youtrack team.

Yes, for your case specifically, you can check the Pull (Merge) request's state in a workflow script:

Besides that, users now have access to many different types of VCS-related data in a workflow. More details can be found in our Workflow API documentation: (see the left sidebar for more entities). 

This data is available starting from Youtrack 2020.3, so you need to upgrade in case you use an older Youtarck Standalone.


Please sign in to leave a comment.