Repository navigation
Expand file tree
/
Copy pathsample-deployment-settings.yml
More file actions
51 lines (46 loc) · 1.73 KB
/
Copy pathsample-deployment-settings.yml
File metadata and controls
51 lines (46 loc) · 1.73 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
# This is a sample deployment settings file
# See the documentation for more details on how to use this file
# If no file is specified, the following repositories are excluded by default
# restrictedRepos: ['admin', '.github', 'safe-settings']
restrictedRepos:
exclude:
- admin
- .github
- safe-settings
- admin-*
include:
- docs
- core-*
configvalidators:
- plugin: collaborators
error: |
`Admin cannot be assigned to collaborators`
script: |
console.log(`baseConfig ${JSON.stringify(baseconfig)}`)
return baseconfig.permission != 'admin'
overridevalidators:
- plugin: branches
error: |
`Branch protection required_approving_review_count cannot be overidden to a lower value`
script: |
const baseCount = baseconfig?.protection?.required_pull_request_reviews?.required_approving_review_count
const overrideCount = overrideconfig?.protection?.required_pull_request_reviews?.required_approving_review_count
if (baseCount && overrideCount) {
return overrideCount >= baseCount
}
return true
- plugin: labels
error: |
Some error
script: |
return true
# disable_plugins (optional) — disable safe-settings plugins at the deployment layer.
# Each entry is either a plugin name (shorthand for target: all) or { plugin, target }.
# target is one of: self | children | all (default: all).
# Declared here, target: all strips the plugin from every level below for every repo.
# See docs/README.md ("Disabling plugins") for the full strip matrix and limitations.
#
# disable_plugins:
# - plugin: rulesets # disables rulesets everywhere
# target: all
# - milestones # shorthand → { plugin: milestones, target: all }