Reputation: 341
I have made check-in comments mandatory in Team Foundation Server 2012. Now I need to enforce each check-in comment is in this format:
[JIRA-1234] testing TFS checkins
Is creating a custom check-in policy the only way to achieve this or is their an alternative? Custom check-in policies are client-side. is there a server-side solution?
Upvotes: 1
Views: 417
Reputation: 22235
You could create an ISubscriber plug-in that gets deployed to the TFS Server and runs server-side. ISubscriber plug-ins can subscribe to TFS Events (such as Check-In) and have custom code to respond appropriately.
Unfortunately, it doesn't give the opportunity to prevent the check-in, but you could send a notification to a dev lead/manager, or automatically roll-back the check-in.
More info on writing an ISubscriber here: http://nakedalm.com/team-foundation-server-2010-event-handling-with-subscribers/
Upvotes: 2