def __init__(self):
if is_appengine_local():
secrets = DEBUG_CLIENT_SECRETS
else:
secrets = CLIENT_SECRETS
with open(secrets, 'r') as contents:
secrets = json.loads(contents.read())
github_token = secrets.get(TOKEN_KEY)
self.webhook_secret = secrets.get(WEBHOOK_SECRET)
if is_appengine_local():
self.reporter_host = DEBUG_CRASH_REPORTER_HOST
self.repo_name = '{0}/{1}'.format(DEBUG_OWNER, DEBUG_REPO)
else:
self.reporter_host = CRASH_REPORTER_HOST
self.repo_name = '{0}/{1}'.format(OWNER, REPO)
self.github_client = Github(login_or_token=github_token)
评论列表
文章目录