Scoped VCS commands, possible?

Answered

Is it possible to define the behavior of a VCS command depending on the branch that the commit is being merged into. The use case I'm looking at is as following.

I have a workflow of Open -> In Progress -> Fixed -> Verified -> Merged. A developer will create a branch off master and put X changes into it to fix one or more related issues. When those are committed into the feature branch, I want those issues to be marked as Fixed. This is simple enough with a "#ABC-123 Fixed" in the commit message. At some point the build server will kick and our QA team will take a look at all the issues in the Fixed state with the corresponding build number. They'll test and flag all the passing issues as Verified. Once all the issues with a given build # are in the verified stage we'll perform a squash merge into master. At this point I'd like the same commit message "#ABC-123 Fixed" to move the issue to the Merged state which will end the issue's lifecycle. Currently the best solution is to run a small script that performs a squash and replaces all "#ABC-123 Fixed" with "#ABC-123 Merged".

I assume this might be possible with either workflows or git hooks. I just can't seem to find the right way to do it.

0
1 comment

Here's what we can suggest in this case: if you start using an integration with TeamCity, you can configure a command there which would move all Fixed issues into Verified when their IDs appear in a commit into the master branch.

More about TeamCity integration: https://www.jetbrains.com/help/youtrack/standalone/Integration-with-TeamCity.html

Please let us know if you have any further questions. Thanks!

0

Please sign in to leave a comment.