SKH
SKH

Reputation: 31

TFS Git Commit message validation

We want to implement commit policy in TFS Git how can we do it ?
Example we want to allow user to do git push only when its commit message is validated. (We want to execute our script after git push for validation ). Any idea how to do it ? (We do have git client side hook but there are overheads. Client side hooks need to be set on each client machines and if user bypass it then validations are not executed)

Upvotes: 3

Views: 2234

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51153

Sorry we do not have any build-in feature to achieve your requirement in Azure DevOps at the moment.

There is only branch policy and it is used for Pull Request instead of check-in/commit/push (Merge code after complete pull request).

Check for comment resolution

Configure a comment resolution policy for your branch by selecting Check for comment resolution.

enter image description here

There is also not any service hook available to enable commit policy in Git for Azure DevOps.

Just as Matt pointed out in the comment, we do have the feature on-road map according to this user voice-- Add Git pre-receive hooks You could kindly vote up it and track the detail process from there.

Upvotes: 2

Related Questions