Bitbucket Pull Request Webtask
A Webtask that works as a webhook for send an email each time that there is a new pull request on Bitbucket.
- Webtask account
- Bitbucket repository
- Sendgrid API key
Retrieve a new API Key from Settings > API KEYS. Make sure that creates a General API Key and select at least FULL ACCESS for the Mail Send option.
- Install Webtask CLI. You can follow the instructions here.
- Create a new task using this file and the following command:
wt create --secret SENDGRID_KEY=<REPLACE_WITH_YOUR_KEY> \ --secret EMAIL_TO=<REPLACE_WITH_AN_EMAIL> \ --secret EMAIL_FROM=<REPLACE_WITH_AN_EMAIL> index.js
Select the repository go into Settings > Webhooks create a new one, select any title paste the Webtask URL into the URL input and in triggers select Choose from a full list of triggers and just select Pull Request > Created.