This repository was archived by the owner on Mar 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 30
30
# The number of seconds to wait between attempts to verify that a deployment
31
31
# has occurred
32
32
POLLING_PERIOD = 5
33
+ # Pull requests from authors with the following associations to the project
34
+ # should automatically receive previews
35
+ #
36
+ # https://developer.github.com/v4/enum/commentauthorassociation/
37
+ TRUSTED_AUTHOR_ASSOCIATIONS = ('COLLABORATOR' , 'MEMBER' , 'OWNER' )
33
38
34
39
logging .basicConfig (level = logging .INFO )
35
40
logger = logging .getLogger (__name__ )
@@ -237,17 +242,8 @@ def has_label(pull_request):
237
242
return False
238
243
239
244
def should_be_mirrored (pull_request ):
240
- print '''
241
- is_open(pull_request): {}
242
- pull_request['author_association']: {}
243
- has_label(pull_request): {}
244
- ''' .format (
245
- is_open (pull_request ),
246
- pull_request ['author_association' ],
247
- has_label (pull_request )
248
- )
249
245
return is_open (pull_request ) and (
250
- pull_request ['author_association' ] == 'COLLABORATOR' or
246
+ pull_request ['author_association' ] in TRUSTED_AUTHOR_ASSOCIATIONS or
251
247
has_label (pull_request )
252
248
)
253
249
You can’t perform that action at this time.
0 commit comments