Move configuration from config.py to config.json and add support for GitHub organization webhooks

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/
This commit is contained in:
Dash Eclipse
2021-04-21 23:57:51 +00:00
parent 08c985a805
commit d3dc14977b
8 changed files with 76 additions and 49 deletions
+18
View File
@@ -0,0 +1,18 @@
{
"bot_token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
"port": 12345,
"gh_webhooks": {
"Codertocat/Hello-World": {
"chat_id": -1001234567890,
"secret": "FPAh9pwRHCLpRL7j"
},
"Octocoders/Hello-World": {
"chat_id": "@username",
"secret": "H4xvfPNCnUhPTERq"
},
"octo-org": {
"chat_id": "@username",
"secret": "KLrYeiA3vNLPVbAv"
}
}
}