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 3030# The number of seconds to wait between attempts to verify that a deployment
3131# has occurred
3232POLLING_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' )
3338
3439logging .basicConfig (level = logging .INFO )
3540logger = logging .getLogger (__name__ )
@@ -237,17 +242,8 @@ def has_label(pull_request):
237242 return False
238243
239244def 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- )
249245 return is_open (pull_request ) and (
250- pull_request ['author_association' ] == 'COLLABORATOR' or
246+ pull_request ['author_association' ] in TRUSTED_AUTHOR_ASSOCIATIONS or
251247 has_label (pull_request )
252248 )
253249
You can’t perform that action at this time.
0 commit comments