Repository navigation
Expand file tree
/
Copy pathrulesets.yaml
More file actions
117 lines (116 loc) · 3.96 KB
/
Copy pathrulesets.yaml
File metadata and controls
117 lines (116 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# yaml-language-server: $schema=./schema/rulesets.schema.json
#
# Default-branch rules for managed repositories, in two tiers. Each ruleset
# names its repos, so every managed repo is in exactly one list or in none.
#
# repo-main-default Reviewed: a pull request, one approval, signed commits
# and the repo's own CI check. For repos other projects
# build on, where the OpenSSF Scorecard's branch
# protection and code review checks are worth meeting.
# repo-main-basic Basic: the branch cannot be deleted or force-pushed.
# Merges do not wait on a review or a check.
#
# PlatformRuntimeKit is in neither list: it is private, and rulesets are
# unavailable for private repos on GitHub Free. Floe is in neither list either:
# its main branch has classic branch protection in repos.yaml, matching Thaw's.
# Thaw is not managed here at all.
#
# A repo names its own CI checks in repos.yaml (requiredStatusChecks), since
# job names differ per repo. For a repo that names none, GitHub requires the
# first entry of acceptAnyOf below.
#
# On GitHub Free (enableRulesets: false), org rulesets are not available (403).
# Each ruleset is provisioned as a RepositoryRuleset on the repos it lists. Set
# enableRulesets: true only if the org upgrades to Team+.
rulesets:
- id: repo-main-default
name: Default branch protection
target: branch
enforcement: active
# Org owners and repo admins can merge without the review or the check, but
# only through a pull request: nobody pushes to the branch directly. That
# includes this program's CODEOWNERS sync, which commits to the default
# branch, so a change to config/codeowners.yaml reaches these repos by pull
# request.
bypassActors:
# No actorId: GitHub stores none for organization admins, so naming one
# shows as a change on every run.
- actorType: OrganizationAdmin
bypassMode: pull_request
- actorType: RepositoryRole
actorId: 5 # repository admin
bypassMode: pull_request
conditions:
refName:
includes:
- "~DEFAULT_BRANCH"
repositoryName:
includes:
- org-ci
- raycast-extension
rules:
creation: true
update: false
deletion: true
nonFastForward: true
requiredLinearHistory: true
# Merges are squashed by GitHub, which signs them.
requiredSignatures: true
# No copilotCodeReview: the rule's presence is what requests a Copilot
# review on every pull request.
pullRequest:
requiredApprovingReviewCount: 1
dismissStaleReviewsOnPush: true
requireCodeOwnerReview: true
requireLastPushApproval: true
requiredReviewThreadResolution: true
allowedMergeMethods:
- squash
requiredStatusChecks:
enabled: true
acceptAnyOf: [ci, build, test]
strictRequiredStatusChecksPolicy: true
doNotEnforceOnCreate: false
requiredCodeScanning:
enabled: false
mergeQueue:
enabled: false
mergeMethod: SQUASH
groupingStrategy: ALLGREEN
requiredDeployments:
enabled: false
- id: repo-main-basic
name: Default branch basics
target: branch
enforcement: active
conditions:
refName:
includes:
- "~DEFAULT_BRANCH"
repositoryName:
includes:
- website
- updates
- punkto-updates
- floe-updates
- backend
- homebrew-tap
- brand-assets
- menubarspawner
- ThawUI
- .github
rules:
creation: false
update: false
deletion: true
nonFastForward: true
requiredLinearHistory: false
requiredSignatures: false
requiredStatusChecks:
enabled: false
requiredCodeScanning:
enabled: false
mergeQueue:
enabled: false
requiredDeployments:
enabled: false