Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Email all individual owners when a new version is published #1895
Extracted from #815
Now that we've been requiring verified email addresses for publishing, it's more likely this feature will work well.
This is a big task that's more complicated than it looks! Please ask questions if anything is confusing! This task would be great for someone looking to get experience with just about every part of crates.io: the frontend, the backend API, the database, email sending.
What should happen:
Roughly trying to separate these into pieces that can be submitted and reviewed as separate PRs; let me know if you run into any problems with the way I've split the tasks up.
Thank you for making the implementation instructions so clear and easy to follow! I just put up a PR for the first point described here.
On another note, would it be possible to make these points a check box to clarify to those just coming here what's been completed and what's left to do? Thanks a lot!
I'm not sure! I'll admit that I'm mostly copying rubygems' interface, which we don't have to do if we don't want to :)
…cents backend: Add user email preference storing This PR addresses the first step in implementing #1895: "Backend: email preference storing." This commit is the first step in the process to send crate owners an email notification when a new version of one of their crates is published. A database migration adds a `email_notifications` column to the `crate_owners` table, and thus the property was added to the corresponding `CrateOwner` struct. This new property is defaulted to `true`. Because a user may not want to receive a version publish notification for all of their crates, an API endpoint was added to allow them to toggle email notifications for each crate. The front end implementation will be in a forthcoming commit, as well as the actual sending of these notifications.
…10cents front-end: Add email notification preferences This commit adds the front-end capabilities to coincide with the API endpoint that was built on the server. There's also a small bug fixed in the api-token-row; it was throwing an error every time the "/me" route was loaded. This PR addresses the second item in #1895. I like how the UI ended up, but it may very well be creators bias
😄. If this doesn't work, then I'll be happy to iterate! ### Screenshot of a crate with notifications on and one that's off ![image](https://user-images.githubusercontent.com/3310769/69435559-c6d7f880-0d0d-11ea-9d30-0b38a4fc7cfb.png)
The last step for this (actually sending the email) looks like it's the last thing left to do now. Unless someone else is already on it, I'll see if I can get it done soon. The sooner the better because the associated profile settings are already visible to users.