From ff290f3bfccdc198053e86e456599b0af0b7dc8b Mon Sep 17 00:00:00 2001 From: Leonardo Cabeza Date: Sat, 23 Feb 2019 13:08:03 -0500 Subject: [PATCH] (Agrega) Ids de grupos como variables de entorno (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Implementación de zeit/now para los deploys + rewrite (#146) * (Modifica) cross-env como dependencia * (Actualiza) Changelog * (Actualiza) dependencias * (Agrega) variables de grupo como variables de entorno --- CHANGELOG.md | 37 ++++++------------------------------- now-staging.json | 12 +++++++----- now.json | 12 +++++++----- src/config/telegram.js | 6 ++++-- src/index.js | 1 - 5 files changed, 24 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2e03b8..dee077c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,36 +1,6 @@ ## [Unreleased] -## 4.1.4 (2019-02-22) - -### Modificado - -- Se cambió cross-env de devDependency a dependency - -## 4.1.3 (2019-02-16) - -### Modificado - -- Cambio de circleci a travisci - -## 4.1.2 (2019-02-15) - -### Corregido - -- Corrección de errores de dependencia - -## 4.1.1 (2019-02-15) - -### Eliminado - -- Dependencia de nodemon - -## 4.1.0 (2019-02-15) - -### Modificado - -- Migración de api de dialogflow de v1 a v2 - -## 4.0.0 (2019-02-09) +## 4.0.0 (2019-02-23) ### Agregado @@ -40,6 +10,11 @@ - Dependencias +### Modificado + +- Migración de api de dialogflow de v1 a v2 +- Cambio de circleci a travisci + ## 3.3.3 (2018-10-27) ### Actualizado diff --git a/now-staging.json b/now-staging.json index 44cd8d8..e11d565 100644 --- a/now-staging.json +++ b/now-staging.json @@ -2,17 +2,19 @@ "name": "wengy-ven", "alias": "wengy-ven--staging.now.sh", "env": { - "NTBA_FIX_319": "1", - "APP_URL": "@app-url-staging", + "ADMIN_GROUP_ID": "-241180414", "APP_PORT": "@app-port", + "APP_URL": "@app-url-staging", + "BOT_USERNAME": "LeoTestsBot", "DIALOGFLOW_CLIENT_EMAIL": "@dialogflow-client-email", "DIALOGFLOW_PRIVATE_KEY": "@dialogflow-private-key", "DIALOGFLOW_PROJECT_ID": "@dialogflow-project-id", "GITHUB_ACCESS_TOKEN": "@github-access-token", + "MAIN_GROUP_ID": "-165387746", + "NODE_ENV": "staging", + "NTBA_FIX_319": "1", "SENTRY_DSN": "@sentryio-dns-staging", - "TELEGRAM_BOT_TOKEN": "@telegram-bot-token-staging", - "BOT_USERNAME": "LeoTestsBot", - "NODE_ENV": "staging" + "TELEGRAM_BOT_TOKEN": "@telegram-bot-token-staging" }, "version": 1, "public": true, diff --git a/now.json b/now.json index 3467689..685be95 100644 --- a/now.json +++ b/now.json @@ -2,17 +2,19 @@ "name": "wengy-ven", "alias": "wengy-ven--production.now.sh", "env": { - "NTBA_FIX_319": "1", - "APP_URL": "@app-url", + "ADMIN_GROUP_ID": "-1001136339977", "APP_PORT": "@app-port", + "APP_URL": "@app-url", + "BOT_USERNAME": "WengyBot", "DIALOGFLOW_CLIENT_EMAIL": "@dialogflow-client-email", "DIALOGFLOW_PRIVATE_KEY": "@dialogflow-private-key", "DIALOGFLOW_PROJECT_ID": "@dialogflow-project-id", "GITHUB_ACCESS_TOKEN": "@github-access-token", + "MAIN_GROUP_ID": "-1001031605415", + "NODE_ENV": "production", + "NTBA_FIX_319": "1", "SENTRY_DSN": "@sentryio-dns", - "TELEGRAM_BOT_TOKEN": "@telegram-bot-token", - "BOT_USERNAME": "WengyBot", - "NODE_ENV": "production" + "TELEGRAM_BOT_TOKEN": "@telegram-bot-token" }, "version": 1, "public": true, diff --git a/src/config/telegram.js b/src/config/telegram.js index ab5fd7b..3592676 100644 --- a/src/config/telegram.js +++ b/src/config/telegram.js @@ -1,6 +1,8 @@ +const { MAIN_GROUP_ID, ADMIN_GROUP_ID } = process.env; + module.exports = { - mainGroupId: '-165387746', - adminGroupId: '-322716629', + mainGroupId: MAIN_GROUP_ID, + adminGroupId: ADMIN_GROUP_ID, whiteListedDomains: [ 'https://github.com', 'https://medium.com', diff --git a/src/index.js b/src/index.js index 33cc689..3ecdee7 100644 --- a/src/index.js +++ b/src/index.js @@ -58,5 +58,4 @@ process.on('SIGUSR2', () => { process.on('uncaughtException', error => { Sentry.captureException(error); - throw new Error(error); });