-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathsample-deployment-settings.yml
More file actions
47 lines (43 loc) · 1.94 KB
/
sample-deployment-settings.yml
File metadata and controls
47 lines (43 loc) · 1.94 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
# 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 supports both glob patterns and regex patterns
# Glob patterns: use * for wildcards (e.g., admin-*, core-*)
# Regex patterns: use regex syntax (e.g., ^admin-.*$, ^\\.github$)
# The system automatically detects the pattern type based on regex indicators
restrictedRepos:
exclude:
- admin
- .github
- safe-settings
- admin-* # Glob pattern: matches admin-test, admin-config, etc.
- ^test-.*$ # Regex pattern: matches test- prefix
- ^\\.github$ # Regex pattern: matches exactly .github
include:
- docs
- core-* # Glob pattern: matches core-api, core-service, etc.
- ^production-.*env$ # Regex pattern: matches production-*env
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: |
console.log(`baseConfig ${JSON.stringify(baseconfig)}`)
console.log(`overrideConfig ${JSON.stringify(overrideconfig)}`)
if (baseconfig.protection.required_pull_request_reviews.required_approving_review_count && overrideconfig.protection.required_pull_request_reviews.required_approving_review_count ) {
return overrideconfig.protection.required_pull_request_reviews.required_approving_review_count >= baseconfig.protection.required_pull_request_reviews.required_approving_review_count
}
return true
- plugin: labels
error: |
Some error
script: |
return true