From aa7a7ea0339e5e4b17f86539ea8dcc9c3b292d9d Mon Sep 17 00:00:00 2001 From: "Matt Wicks [SSW]" Date: Fri, 29 Sep 2023 16:43:05 +1000 Subject: [PATCH] =?UTF-8?q?Update=20Rule=20=E2=80=9Cprotect-your-master-br?= =?UTF-8?q?anch/rule=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rules/protect-your-master-branch/rule.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rules/protect-your-master-branch/rule.md b/rules/protect-your-master-branch/rule.md index 58aae8e0ff4..5c27b4ca654 100644 --- a/rules/protect-your-master-branch/rule.md +++ b/rules/protect-your-master-branch/rule.md @@ -15,10 +15,20 @@ archivedreason: null guid: 93bfec41-6b37-4413-a660-931fffa88d44 --- -Use the VSTS Branch Policies feature. This is a super sexy feature. +Branch protection is a feature in version control software that allows teams to define rules and restrictions around who can make changes to specific branches, what types of changes are allowed, and if there are conditions that have to be met. +This can include: + +- number of reviewers +- linked work items e.g. PBIs (super useful to track back to why the code was changed) +- any feedback has been addressed/resolved +- enforcing specific merge types +- checking that builds pass +- checking other services e.g. code quality like SonarQube +- automatically adding specific people to review the code + ::: bad ![Figure: Bad example – no protection – anyone can make unreviewed changes](protect-branch-bad.jpg)