def determine_push_rights(*, branch_whitelist, TRAVIS_BRANCH,<EOL>TRAVIS_PULL_REQUEST, TRAVIS_TAG, build_tags, fork):
canpush = True<EOL>if TRAVIS_TAG:<EOL><INDENT>if not build_tags:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT>return build_tags<EOL><DEDENT>if not any([re.compile(x).match(TRAVIS_BRANCH) for x in branch_whitelist]):<EOL><INDENT>print("<STR_LIT>"<EOL>"<STR_LIT>", file=sys.stderr)<EOL>print("<STR_LIT>".format(TRAVIS_BRANCH=TRAVIS_BRANCH), file=sys.stderr)<EOL>canpush = False<EOL><DEDENT>if TRAVIS_PULL_REQUEST != "<STR_LIT:false>":<EOL><INDENT>print("<STR_LIT>", file=sys.stderr)<EOL>canpush = False<EOL><DEDENT>if fork:<EOL><INDENT>print("<STR_LIT>", file=sys.stderr)<EOL>canpush = False<EOL><DEDENT>if last_commit_by_doctr():<EOL><INDENT>print(red("<STR_LIT>"<EOL>"<STR_LIT>"), file=sys.stderr)<EOL>canpush = False<EOL><DEDENT>return canpush<EOL>
Check if Travis is running on ``master`` (or a whitelisted branch) to
    determine if we can/should push the docs to the deploy repo