Skip to content

Commit a9d3b50

Browse files
committed
Add screenshot
1 parent 3356615 commit a9d3b50

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

_posts/articles/2023-10-01-protecting-codeowners-file.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ You can also use an email address instead of an account name. See an example wit
2929

3030
Then, make sure that the branch is protected using the repository's **Setting** > **Branches** > **Branch protection rules** > **Add protection rule** button. Enter `main` for the **Branch name pattern** and then select **Require a pull request before merging**. The settings expand so you can also choose **Require review from Code Owners**. Once you have the settings, click the **Create** button at the bottom of the page. More details are in the [GitHub Docs](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches).
3131

32+
<img src="../../images/branch-protection-rule.png" alt="GitHub Branch protection rules settings.">
33+
3234
To see an example of this setup, look at the Microsoft 365 community documentation repository at https://github.com/MicrosoftDocs/microsoft-365-community/. The `CODEOWNERS` file contains a team name, `@microsoftdocs/officedocs-admin`, and those team members can review and merge the list of documents in the `CODEOWNERS` file. The documents contain configuration information as well as the `CODEOWNERS` file itself.
3335

3436
```

images/branch-protection-rule.png

190 KB
Loading

0 commit comments

Comments
 (0)