d3dc14977b
remove _format_watch() from utils.github_webhook as the value of watchers_count is always identical with stargazers_count https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#watch https://developer.github.com/changes/2012-09-05-watcher-api/
13 lines
268 B
Python
13 lines
268 B
Python
import json
|
|
from os import environ
|
|
|
|
if environ.get('DYNO'):
|
|
data = json.loads(environ.get("HOOK_CONFIG"))
|
|
else:
|
|
with open("config.json") as f:
|
|
data = json.load(f)
|
|
|
|
BOT_TOKEN = data['bot_token']
|
|
PORT = data.get('port')
|
|
GH_WEBHOOKS = data['gh_webhooks']
|