I’ve got a YouTrack and TeamCity server, properly configured for integration with each other. I commit my work to GitHub, which TeamCity monitors. The goal is to allow me to commit changes and include in those commits YouTrack commands that update the issues I work on.
The problem I am facing is that when I make a git commit such as the one below:
Fix appearance of content tip edit icon.
[FIXED] Tip on storage type passwords had a missing edit icon.
#MP-5 fixed
GIT strips the last line, because it looks like commentary, and the commit message contains only this:
Fix appearance of content tip edit icon.
[FIXED] Tip on storage type passwords had a missing edit icon.
Meaning, no YouTrack command, and no issue update.
I proceeded to try alternatives, such as:
Fix appearance of content tip edit icon.
[FIXED] Tip on storage type passwords had a missing edit icon.
MP-5 fixed
and
Fix appearance of content tip edit icon.
[FIXED] Tip on storage type passwords had a missing edit icon.
- #MP-5 fixed
But those didn’t trigger YouTrack commands (even though YouTrack did see the commit message).
So the question is basically:
How do I solve this workflow problem? Note that I do not want to disable commentary stripping in GIT, because that will break git commit -av (which contains a nicely formatted diff overview of my changes in comments). Am I going to have to resort to invoking the YouTrack REST API using some custom code that parses my commit messages? Has this been done before?
You can use
It should work according to http://youtrack.jetbrains.com/issue/JT-10051