Skip to content

Commit c5d5830

Browse files
committed
Revert back from rulesets to branch protection rules
1 parent 94d2c0f commit c5d5830

File tree

1 file changed

+44
-82
lines changed

1 file changed

+44
-82
lines changed

.github/repository-settings.md

Lines changed: 44 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -23,91 +23,53 @@ settings](https://github.com/open-telemetry/community/blob/main/docs/how-to-conf
2323
Read repository contents and packages permissions
2424
- Allow GitHub Actions to create and approve pull requests: UNCHECKED
2525

26-
## Rules > Rulesets
27-
28-
### `main` and release branches
29-
30-
- Targeted branches:
31-
- `main`
32-
- `release/*`
33-
- Branch rules
34-
- Restrict deletions: CHECKED
35-
- Require a pull request before merging: CHECKED
36-
- Required approvals: 1
37-
- Require review from Code Owners: CHECKED
38-
- Allowed merge methods: Squash
39-
- Require status checks to pass
40-
- Do not require status checks on creation: CHECKED
41-
- Status checks that are required
42-
- EasyCLA
43-
- `required-status-check`
44-
- `gradle-wrapper-validation`
45-
- Block force pushes: CHECKED
46-
- Require code scanning results: CHECKED
47-
- CodeQL
48-
- Security alerts: High or higher
49-
- Alerts: Errors
50-
51-
> [!NOTE]
52-
> This repository can't "require linear history" because there is an old merge commit on `main`
53-
> (and so also on the release branches).
54-
55-
### `cloudfoundry` branch
56-
57-
- Targeted branches:
58-
- `cloudfoundry`
59-
- Branch rules
60-
- Restrict deletions: CHECKED
61-
- Require linear history: CHECKED
62-
- Require a pull request before merging: CHECKED
63-
- Required approvals: 1
64-
- Require review from Code Owners: CHECKED
65-
- Allowed merge methods: Squash
66-
- Require status checks to pass
67-
- EasyCLA
68-
- Block force pushes: CHECKED
69-
70-
### `gh-pages` branch
71-
72-
- Targeted branches:
73-
- `gh-pages`
74-
- Branch rules
75-
- Restrict deletions: CHECKED
76-
- Require linear history: CHECKED
77-
- Block force pushes: CHECKED
78-
79-
### Old-style release branches
80-
81-
- Targeted branches:
82-
- `v0.*`
83-
- `v1.*`
84-
- Branch rules
85-
- Restrict creations: CHECKED
86-
- Restrict updates: CHECKED
87-
- Restrict deletions: CHECKED
88-
89-
### Restrict branch creation
90-
91-
- Targeted branches
92-
- Exclude:
93-
- `release/*`
94-
- `renovate/**/*`
95-
- `otelbot/**/*`
96-
- `revert-*/**/*` (these are created when using the GitHub UI to revert a PR)
97-
- Restrict creations: CHECKED
98-
99-
### Restrict updating tags
100-
101-
- Targeted tags
102-
- All tags
103-
- Restrict updates: CHECKED
104-
- Restrict deletions: CHECKED
105-
10626
## Branch protections
10727

108-
### `main`, `release/*`, `cloudfoundry`
28+
The order of branch protection rules
29+
[can be important](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule#about-branch-protection-rules).
30+
The branch protection rules below should be added before the `**/**` branch protection rule
31+
(this may require deleting the `**/**` rule and recreating it at the end).
32+
33+
### `main`
34+
35+
- Require branches to be up to date before merging: UNCHECKED
36+
37+
(PR jobs take too long, and leaving this unchecked has not been a significant problem)
38+
39+
- Status checks that are required:
40+
41+
- EasyCLA
42+
- required-status-check
43+
- gradle-wrapper-validation
44+
- CodeQL
45+
46+
### `release/*`
47+
48+
Same settings as above for [`main`](#main).
49+
50+
### `v0.*` and `v1.*` (old-style release branches)
51+
52+
- Lock branch: CHECKED
53+
54+
- Do not allow bypassing the above settings: CHECKED
55+
56+
### `cloudfoundry`
57+
58+
Same settings as above for [`main`](#main),
59+
except for the `required-status-check` required status check.
60+
61+
### `renovate/**/*` and `otelbot/**/*`
62+
63+
Same settings as
64+
for [`dependabot/**/*`](https://github.com/open-telemetry/community/blob/main/docs/how-to-configure-new-repository.md#branch-protection-rule-dependabot)
65+
66+
### `gh-pages`
67+
68+
- Everything UNCHECKED
10969

110-
- Restrict who can push to matching branches: CHECKED
70+
(This branch is currently only used for directly pushing benchmarking results from the
71+
[Nightly overhead benchmark](https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/workflows/nightly-benchmark-overhead.yml)
72+
job)
11173

11274
## Code security and analysis
11375

0 commit comments

Comments
 (0)