Skip to content

Commit 9eec4f2

Browse files
authored
Merge pull request #593 from cloudfoundry/branchprotection
Add branch protection best practices
2 parents b116786 + 569ccfb commit 9eec4f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

org/readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ branch-protection:
6363
include: [ "^<default branch>$", "^v[0-9]*$"] # note the surrounding ^...$ to avoid matching branches containing 'main' or 'v'
6464
```
6565

66+
Best Practices:
67+
- Replace github deploy keys by working group bot users. Branch protection rules enforce PRs for commits with deploy keys (enforce_admins=true).
68+
- Ensure that all bot users are members of the working group bots team or working group area bots team.
69+
- Remove all direct repository users in 'Settings > Collaborators and teams'. Repository access shall be governed by the generated teams only.
70+
- You may exclude repos w/o source code (e.g. bbl config and state, semver). See [branchprotection.yml](https://github.com/cloudfoundry/community/blob/main/org/branchprotection.yml) for examples.
71+
6672
Limitations:
6773
- The branchprotector doesn't support wildcards for branch rules. I.e. every version branch gets its own rule.
6874
- The branchprotector doesn't delete unneeded branch protection rules e.g. when a version branch got deleted.

0 commit comments

Comments
 (0)