Question of the day · DevOps
Exam AZ-400: Designing and Implementing Microsoft DevOps Solutions: today's question
Today · Design and implement a source control strategy
An organisation has a baseline of required checks for every main branch plus extra requirements for a few repositories. The team finds that, with branch protection rules, only one rule applies to a branch, so the baseline and the repository-specific rule cannot both take effect. What should they use to layer the requirements?
- AGitHub rulesets: several rulesets can target one branch and their rules are aggregated, with the most restrictive winning
- BA second branch protection rule on the same branch pattern in each repository, which GitHub combines with the first rule
- CCODEOWNERS files in every repository, because each repository can then define which teams own which paths and must approve
- DA GitHub Actions workflow that comments on pull requests that miss the baseline and asks the author to add the missing checks
Show the answer
A. Only one branch protection rule can apply to a branch, which makes overlap hard to reason about. Rulesets have no priority: all rulesets targeting a branch are aggregated, and where the same rule differs, the most restrictive version applies. Organisation-level rulesets can carry the baseline.
Written for practice in the style of the exam: never a question from the real exam. A new one every day.
Want ten more now?
The free readiness check asks ten questions weighted like the real exam and shows your score by section.