Is there a way to create a rule in Azure DevOps which enforces linking work items to azure repo commit as mandatory?
You cannot enforce linking work items for individual commits. However, you can require that work items be linked as part of your Pull Request Policy.
Here's Microsoft's documentation on how to set it up:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With