guides-cms
guides-cms copied to clipboard
Auto notify users when another user suggests an edit to their article
We need to have a better way to notify users when their article gets editor suggestions. We could do something simple like send an email when we save the edit to a branch. Here's some other ideas:
- Maybe we can create a notification with the github API so the notification just shows up in the normal github notifications center?
- Look for article suggestions via github API when user logs in
- The idea here is to scan the logging in users' articles for the existence of any 'branches' in the details.json file.
- This way we could show a popup or some kind of way to redirect the user to the possible edits.
There's no way to create notifications via the github API. Please let me know if I'm missing it. However, we could use @mentions to create a notification. The workflow would be like this:
- Prompt user if they are ready to notify the original author of their edits
- We should only do this when a save is made to a branched article.
- If user says yes to notify the original author:
- Create pull request and use
@mentionto original author in pull requestbodyparameter
- Create pull request and use
This should create a notification for the user. It will also help to streamline the edit workflow.
We could also add a button to the article view to create a pull request when the following conditions are met:
- User is logged in
- User is viewing a branch version of an article
- Logged in user is the 'owner' of the branched article they are viewing
This way editors can keep making changes and then only notify (i.e. create pull request) when the editor is 'done'.
The alternative is we always create a pull request when saving a branched version of the article. This way the conversation between the editor and original author gets started immediately. The downside is the author might see half of the edits and get off track. Any feelings on this?
One caveat to consider here is pull requests will take in every change between branches. So, there can only be 1 pull request open for a branch at a time. This could be a problem if 1 editor is editing 2 or more guides at the same time.