Enforce Naming Commit Messages with Visual Studio Team Services

Nathan Gallenson November 6, 2017

I see some help pages on here asking for something similar, but I can't seem to find anything regarding enforcing Jira IDs in Visual Studio Team Services in Git mode's commit messages.  Has anyone attempted to enforce that when utilizing a tool like Jira Git Integration?  Yet Another Commit Checker seems to only support BitBucket.  Ideas?

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Mark L. Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2017

Hi Nathan,

If you're using TFS on-premises, there's an option for deploying an add-in to do this. You can also do the enforcement on the client side as well.

The thing that doesn't have an option available is to do this on the Visual Studio Team Services online --- there's no hook or API support for failing a commit because it doesn't meet pre-conditions.

Is TFS on-premises OR client side enforcement an option for you?

Nathan Gallenson November 6, 2017

We are using on-premise TFS. Both your suggestions sound like they could be viable.  

Mark L. Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2017

So there's two levels of checking that can be done...

There's a real check where the issue must really exist and the Jira API is checked to make sure.

What a lot of people do is just check the message to see if it's likely it has a Jira issue referenced: ABC-1234 (even if ABC-1234 isn't a real Jira issue). The advantage to that is there is no API check, so you don't get into Jira credentials or Jira problems causing TFS to fail commits.

Nathan Gallenson November 6, 2017

I see.  Well, at the very least, that's a good start. Any links to tutorials/documentation covering that functionality? 

Mark L. Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2017
Nathan Gallenson November 6, 2017

Perfect. Thank you kindly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events