File tree 2 files changed +10
-11
lines changed 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
- BRANCH_PROTECTION_EXEMPT_REPOSITORIES = [
1
+ EXEMPT_REPOSITORIES = [
2
2
# non-engineering repo
3
3
"australian-chapter" ,
4
4
# non-engineering repo
27
27
"tech-support" ,
28
28
]
29
29
30
- BRANCH_PROTECTION_REQUIRED_STATUS_CHECK_MAP = {
30
+ REQUIRED_STATUS_CHECK_MAP = {
31
31
"cccatalog-api" : ["continuous-integration/travis-ci" ],
32
32
"cccatalog-frontend" : ["ci/circleci: lint" , "ci/circleci: unit" ],
33
33
"creativecommons.github.io-source" : ["continuous-integration/travis-ci" ],
37
37
"netlify/cc-fonts/deploy-preview" ,
38
38
],
39
39
"vocabulary" : [
40
- "ci/circleci: lint " ,
41
- "ci/circleci: test " ,
42
- "ci/circleci: build " ,
40
+ "Lint " ,
41
+ "Unit tests " ,
42
+ "Build " ,
43
43
"netlify/cc-vocabulary/deploy-preview" ,
44
44
],
45
45
"vue-vocabulary" : [
46
46
"ci/circleci: lint" ,
47
47
"ci/circleci: unit" ,
48
48
"netlify/cc-vue-vocabulary/deploy-preview" ,
49
49
],
50
- }
50
+ }
Original file line number Diff line number Diff line change 12
12
13
13
# Local/library specific
14
14
from labels import REQUIRED_LABELS
15
- from branch_protections import BRANCH_PROTECTION_EXEMPT_REPOSITORIES , \
16
- BRANCH_PROTECTION_REQUIRED_STATUS_CHECK_MAP
15
+ import branch_protections
17
16
18
17
19
18
def set_up_github_client ():
@@ -78,13 +77,13 @@ def update_labels(repo):
78
77
79
78
def update_branch_protection (repo ):
80
79
master = repo .get_branch ("master" )
81
- if repo .name not in BRANCH_PROTECTION_EXEMPT_REPOSITORIES :
82
- if repo .name in BRANCH_PROTECTION_REQUIRED_STATUS_CHECK_MAP :
80
+ if repo .name not in branch_protections . EXEMPT_REPOSITORIES :
81
+ if repo .name in branch_protections . REQUIRED_STATUS_CHECK_MAP :
83
82
master .edit_protection (
84
83
required_approving_review_count = 1 ,
85
84
user_push_restrictions = [],
86
85
strict = True ,
87
- contexts = BRANCH_PROTECTION_REQUIRED_STATUS_CHECK_MAP [
86
+ contexts = branch_protections . REQUIRED_STATUS_CHECK_MAP [
88
87
repo .name
89
88
],
90
89
)
You can’t perform that action at this time.
0 commit comments