-
Notifications
You must be signed in to change notification settings - Fork 645
backend: Implement sending notification email when a new version is published #2705
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
backend: Implement sending notification email when a new version is published #2705
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @carols10cents (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR @paolobarbolini! I haven't had a chance to review the code in-depth, but I have a few initial points I would like to raise.
The verified email address is not made publicly available, so I think we should hide email addresses from other recipients. There are also some aspects that the team needs to consider from an ops perspective:
(Our agenda for this week is already pretty busy, but I hope to raise these points in a meeting soon.) |
Ah, right. I'll change it in the following days. When it comes to bounces, it could probably be handled with a Mailgun Webhook? |
ab812a1
to
aa316c4
Compare
Changed it. While I was at it I rebased it to the master branch. |
☔ The latest upstream changes (presumably #2962) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
aa316c4
to
25a1b2a
Compare
Rebased on the latest master @rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
☔ The latest upstream changes (presumably #3062) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@paolobarbolini sorry for the long radio silence on this topic. we've discussed this in the team meeting today and we'd love to see an MVP of this merged in the near future. I haven't looked at the implementation yet in detail, but one question that came up was how we would handle owners that are GitHub Teams. do you have any thoughts on this topic? for the MVP implementation we could consider sending the emails only to regular user owners for now. would be great if you could also get this PR rebased. I hope the conflicts are not too bad 😞 |
25a1b2a
to
9df497e
Compare
Rebased
It looks like the GitHub API does expose the organization contact email for organizations with a public contact email, so it could probably be backfilled, at least for some of them. Here's an example:
The biggest issue will probably be, other than the fact that not all organizations have a public email address, with letting organizations unsubscribe from notifications emails, since as far as I know you can't login using the organization account. |
☔ The latest upstream changes (presumably #3483) made this pull request unmergeable. Please resolve the merge conflicts. |
9df497e
to
5d73fe5
Compare
I squashed all of the previous commits and rebased. #3483 made it so that the email configuration is parsed at startup, so in order to be able to send emails from the background job, I made a separate commit which adds |
5d73fe5
to
5529141
Compare
Is there any work being done on this PR, @paolobarbolini ? |
I haven't kept up with the rebasing but other than that either there hasn't been any feedback or there are things like monitoring bounces which should be done separately. |
@paolobarbolini I've tried to rebase this PR over the weekend, but with all the index syncing changes it was a bit harder than I had hoped. I still used your PR as a starting point for #9341, so thank you for working on this, and sorry again that it took so long for this to land :) |
I believe this should complete the last task in #1895
A few notes on the implementation:
db_new_user
implementation to generate a different email based on the username, otherwise I wouldn't be able to test if all of the owners would be counted in byowners_with_notification_email
I put all emails in theTo
header since crate owners are public anywayI manually tested this locally by setting this to
true
.Rendered email:
