What I would like to achive is that the developer is forced to include the bugfix/feature workitem id in the commit message that he is currently working on
or do some regex validation mybe
Like:
- fix: fixes bug #123
- feat: implements #124
Settings are forcing a developer to include workitems but that he can link in the dialog and that does not get inclided in the commit message
>Solution :
For commits, ideally, you would look to use pre-commit git hooks. These can be run on the client or the server. The bad news is that Azure DevOps does not support server-side git hooks as mentioned here. You can use client hooks however it would then require each developer to ensure they have set them up on their machine.
For pull requests, you can set up PR templates, these would not enforce but could prompt users with a checklist.
Finally, a webhook is raised when a PR is created in Azure DevOps. You can hook into this and perform custom logic including calling an API to add a PR comment.