Install todoist integration
This commit is contained in:
parent
dbb12c2192
commit
584d35478d
4 changed files with 35 additions and 1 deletions
1
Pipfile
1
Pipfile
|
@ -8,6 +8,7 @@ flask = "*"
|
||||||
github-webhook = "*"
|
github-webhook = "*"
|
||||||
waitress = "*"
|
waitress = "*"
|
||||||
sentry-sdk = {extras = ["flask"], version = "*"}
|
sentry-sdk = {extras = ["flask"], version = "*"}
|
||||||
|
todoist-python = "*"
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
black = "*"
|
black = "*"
|
||||||
|
|
30
Pipfile.lock
generated
30
Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "58c4cc1fbede1ecde2fdcb0ab61f0fc0e69181d19efded93bc76229f761814ac"
|
"sha256": "e36b7bdaee5f7529008d66a6326263574d1a54fe085aba1442d042b679d6a3ab"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -30,6 +30,13 @@
|
||||||
],
|
],
|
||||||
"version": "==2018.10.15"
|
"version": "==2018.10.15"
|
||||||
},
|
},
|
||||||
|
"chardet": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
|
||||||
|
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||||
|
],
|
||||||
|
"version": "==3.0.4"
|
||||||
|
},
|
||||||
"click": {
|
"click": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
|
"sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
|
||||||
|
@ -53,6 +60,13 @@
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==1.0.2"
|
"version": "==1.0.2"
|
||||||
},
|
},
|
||||||
|
"idna": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
|
||||||
|
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
|
||||||
|
],
|
||||||
|
"version": "==2.7"
|
||||||
|
},
|
||||||
"itsdangerous": {
|
"itsdangerous": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
|
"sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
|
||||||
|
@ -73,6 +87,13 @@
|
||||||
],
|
],
|
||||||
"version": "==1.0"
|
"version": "==1.0"
|
||||||
},
|
},
|
||||||
|
"requests": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c",
|
||||||
|
"sha256:a84b8c9ab6239b578f22d1c21d51b696dcfe004032bb80ea832398d6909d7279"
|
||||||
|
],
|
||||||
|
"version": "==2.20.0"
|
||||||
|
},
|
||||||
"sentry-sdk": {
|
"sentry-sdk": {
|
||||||
"extras": [
|
"extras": [
|
||||||
"flask"
|
"flask"
|
||||||
|
@ -91,6 +112,13 @@
|
||||||
],
|
],
|
||||||
"version": "==1.11.0"
|
"version": "==1.11.0"
|
||||||
},
|
},
|
||||||
|
"todoist-python": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:b362ec7296886f6fdb1e4fb367ee33dfb5903f1fbe0f7626543f58294b6df7d0"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==7.0.18"
|
||||||
|
},
|
||||||
"urllib3": {
|
"urllib3": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae",
|
"sha256:41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae",
|
||||||
|
|
|
@ -3,3 +3,5 @@ import os
|
||||||
GITHUB_WEBHOOK_SECRET = os.environ.get("GITHUB_WEBHOOK_SECRET")
|
GITHUB_WEBHOOK_SECRET = os.environ.get("GITHUB_WEBHOOK_SECRET")
|
||||||
|
|
||||||
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
||||||
|
|
||||||
|
TODOIST_API_TOKEN = os.environ.get("TODOIST_API_TOKEN")
|
||||||
|
|
|
@ -5,6 +5,7 @@ import sentry_sdk
|
||||||
from flask import Flask, abort, jsonify
|
from flask import Flask, abort, jsonify
|
||||||
from github_webhook import Webhook
|
from github_webhook import Webhook
|
||||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||||
|
from todoist import TodoistAPI
|
||||||
|
|
||||||
from . import config
|
from . import config
|
||||||
|
|
||||||
|
@ -13,6 +14,8 @@ logging.basicConfig(level=logging.INFO)
|
||||||
if config.SENTRY_DSN:
|
if config.SENTRY_DSN:
|
||||||
sentry_sdk.init(dsn=config, integrations=[FlaskIntegration()])
|
sentry_sdk.init(dsn=config, integrations=[FlaskIntegration()])
|
||||||
|
|
||||||
|
todoist = TodoistAPI(config.TODOIST_API_TOKEN)
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
webhook = Webhook(app, secret=config.GITHUB_WEBHOOK_SECRET)
|
webhook = Webhook(app, secret=config.GITHUB_WEBHOOK_SECRET)
|
||||||
|
|
||||||
|
|
Reference in a new issue