-
Notifications
You must be signed in to change notification settings - Fork 72
feat(subscription): update mentions to donations with subscription #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
a6918fb
feat(subscription): update mentions to donations with subscription
hectorpalmatellez c6a05a6
chore(feedback): update with pr comments - add reference to test and …
hectorpalmatellez 93aaef7
chore(lock): restore main yarn.lock to undo dependency reference changes
hectorpalmatellez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,4 +74,4 @@ LARGERIO_API_KEY= | |
| HEROKU_URL= | ||
| HEROKU_OAUTH_ID= | ||
| HEROKU_OAUTH_SECRET= | ||
| DONATION_AMOUNT= | ||
| SUBSCRIPTION_AMOUNT= | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Description: | ||
| // Huemul explica con peras y manzanas cómo apoyar a la comunidad | ||
| // | ||
| // Dependencies: | ||
| // None | ||
| // | ||
| // Configuration: | ||
| // None | ||
| // | ||
| // Commands: | ||
| // hubot como apoyar - Muestra las instrucciones de cómo apoyar | ||
| // hubot cómo apoyar - Muestra las instrucciones de cómo apoyar | ||
| // | ||
| // Authors: | ||
| // @jorgeepunan @hectorpalmatellez | ||
|
|
||
| const SUPPORT_AMOUNT = process.env.SUBSCRIPTION_AMOUNT || 'US$5' | ||
| const PAYMENT_METHODS = new Map([ | ||
| [ | ||
| 'Suscripción', | ||
| 'Usamos Reveniu para recibir <https://app.reveniu.com/checkout-custom-link/9VamNpRD9b0LNZ3N4NAl2MG5TyY98zln| suscripciones con tarjetas de crédito y débito>. Puedes elegir entre un <https://app.reveniu.com/checkout-custom-link/X6wYvaeZJ4RDFJFKEF93bTBEUOXhTUVV|pago único> o una <https://app.reveniu.com/checkout-custom-link/9VamNpRD9b0LNZ3N4NAl2MG5TyY98zln|suscripción mensual>.' | ||
| ], | ||
| [ | ||
| 'Transferencia', | ||
| `Puedes transferir en pesos chilenos lo equivalente a ${SUPPORT_AMOUNT} a través de la cuenta de :devschile:, escríbele a un admin para que te dé la info bancaria.` | ||
| ] | ||
| ]) | ||
|
|
||
| module.exports = robot => { | ||
| robot.respond(/c(o|ó)mo apoyar/i, msg => { | ||
| const text = | ||
| `Para mantener el servidor donde se aloja el :robot_face: :huemul: y otros proyectos que creamos desde y para la comunidad, se reciben aportes desde ${SUPPORT_AMOUNT} por diferentes medios` | ||
| const footer = | ||
| 'Gracias :pray: por el interés y por las ganas de aportar :gold: a que siga creciendo la comunidad devsChile. Hacemos buen uso de los aportes, desde el pago de los servidores hasta concursos y sorteos de cursos en Udemy, entre otros. :heartbeat:' | ||
| const fields = [] | ||
| let payments = '' | ||
| PAYMENT_METHODS.forEach((value, title) => { | ||
| fields.push({ title, value, short: false }) | ||
| payments += `· *${title}*: ${value}\n` | ||
| }) | ||
| const fallback = `${text}:\n${payments}${footer}` | ||
| if (['SlackBot', 'Room'].includes(robot.adapter.constructor.name)) { | ||
| const options = { | ||
| as_user: true, | ||
| link_names: 1, | ||
| unfurl_links: false, | ||
| attachments: [ | ||
| { | ||
| fallback, | ||
| text, | ||
| title: 'Cómo apoyar', | ||
| title_link: 'https://devschile.cl/', | ||
| fields, | ||
| footer | ||
| } | ||
| ] | ||
| } | ||
| robot.adapter.client.web.chat.postMessage(msg.message.room, null, options) | ||
| } else { | ||
| msg.send(fallback) | ||
| } | ||
| }) | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.