Send email notifications for code contributions to Mozilla add-ons repositories! πŸ“¬
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
dependabot[bot] 72f82b5dae
Bump minimist from 1.2.5 to 1.2.6 (#269)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 11:43:41 +02:00
.circleci Update node version 2022-03-16 14:16:30 +01:00
emails Whitespace cleanup 2020-11-03 11:40:45 +01:00
github Update github query 2021-08-03 18:40:50 +02:00
.eslintrc.json Update dependencies 2016-09-27 19:49:00 +02:00
.gitignore Update gitignore 2017-06-19 12:39:53 +02:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 15:03:43 -07:00
LICENSE Initial 2016-09-01 15:51:02 +02:00
README.md Update README.md 2021-01-18 09:11:17 +01:00
db.js Update dependency mongodb to v4 (#205) 2021-09-23 11:55:30 +02:00
index.js Rewrite initial 2020-09-17 14:51:25 +02:00
package-lock.json Bump minimist from 1.2.5 to 1.2.6 (#269) 2022-03-29 11:43:41 +02:00
package.json Update dependency graphql-request to v4.2.0 (#268) 2022-03-23 18:06:11 +01:00
renovate.json Add renovate.json 2019-08-19 12:08:10 +00:00
report.js Whitespace cleanup 2020-11-03 11:40:45 +01:00

README.md

dependencies Status

Add-on contribution notifier

We love contributions to the Mozilla add-ons ecosystem! And we have a lot of projects people can contribute to.

To make sure contributors are recognized for their efforts, we want to stay up to speed.

Entrypoints

index.js

This script fetches GitHub pull requests from Mozilla add-ons repositories and sends an email notification whenever a pull request by a contributor gets merged. Contributions are stored in a mongoDB to create monthly report (see below).

report.js

This script sends a summary of the contributions for the previous month. It is supposed to run at the beginning of each month.

How do I get a notification?

There is no interface to do that yet, please open a new issue.

How to add a repository?

Add your repository to the REPOSITORIES array in github/repositories.js and submit a pull request.

Developer notes:

This script lives on Heroku, so it expects a couple of environment variables to work correctly (or at all):

  • We store contributions and some metadata like the email recipients in a mongoDB database. The connection URI is stored in:
MONGODB_URI

Email recipients are stored in the metadata collection. The scripts expects to find a document that has a recipients key, with it's value being a serialized array of email addresses.

  • We use the SendGrid service to send emails. The API key for SendGrid is stored in:
SENDGRID_API_KEY
  • In order to dommunicate with the GitHub API, we need an API token. It is stored in:
GITHUB_TOKEN