{"action":"created","comment":{"url":"https://api.github.com/repos/leb2dg/osf.io/pulls/comments/66132612","id":66132612,"diff_hunk":"@@ -173,9 +173,18 @@ function ProjectNotifications(data) {\n                                     subscribe(item, ev.target.value);\n                                 }},\n                                 [\n-                                    item.data.event.title !== 'comment_replies' ? m('option', {value: 'none', selected : item.data.event.notificationType === 'none' ? 'selected': ''}, 'Never') : null,\n-                                    m('option', {value: 'email_transactional', selected : item.data.event.notificationType === 'email_transactional' ? 'selected': ''}, 'Instantly'),\n-                                    m('option', {value: 'email_digest', selected : item.data.event.notificationType === 'email_digest' ? 'selected': ''}, 'Daily')\n+                                    item.data.event.title !== 'comment_replies' && !~item.data.event.title.indexOf('mentions') ?\n+                                        m('option', {value: 'none', selected : item.data.event.notificationType === 'none' ? 'selected': ''}, 'Never') :\n+                                        null,\n+                                    ~item.data.event.title.indexOf('mentions') ?","path":"website/static/js/notificationsTreebeard.js","position":10,"original_position":10,"commit_id":"0c51337fa1034dbeac751a98da63b3bc8492fc06","original_commit_id":"0c51337fa1034dbeac751a98da63b3bc8492fc06","user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"body":"Gosh, really? That's not the behavior I seem to find in the console. It looks like it adds 1 and flips the sign.\r\n\r\n![screen shot 2016-06-07 at 3 01 34 pm](https://cloud.githubusercontent.com/assets/134455/15871084/c55af088-2cc0-11e6-8523-c2a6088c1145.png)","created_at":"2016-06-07T19:03:10Z","updated_at":"2016-06-07T19:03:10Z","html_url":"https://github.com/leb2dg/osf.io/pull/14#discussion_r66132612","pull_request_url":"https://api.github.com/repos/leb2dg/osf.io/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/comments/66132612"},"html":{"href":"https://github.com/leb2dg/osf.io/pull/14#discussion_r66132612"},"pull_request":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/leb2dg/osf.io/pulls/14","id":68070329,"html_url":"https://github.com/leb2dg/osf.io/pull/14","diff_url":"https://github.com/leb2dg/osf.io/pull/14.diff","patch_url":"https://github.com/leb2dg/osf.io/pull/14.patch","issue_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14","number":14,"state":"open","locked":false,"title":"[feature] @ mentions and notifications [OSF-5975][OSF-5658]","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"body":"Cleaner version of https://github.com/CenterForOpenScience/osf.io/pull/5518\r\n\r\n## Purpose\r\nAdd functionality for @/+ mention of contributors in comments. Only confirmed contributors, both bibliographic and non-bibliographic, can be mentioned.\r\n\r\nRelated tickets: https://openscience.atlassian.net/browse/OSF-5658 & https://openscience.atlassian.net/browse/OSF-5975\r\n\r\n## Changes\r\n* @ symbol or + triggers dropdown where user can select the full name of a contributor to mention them in a comment\r\n* At mention names appear as a link to the mentioned contributor\r\n* Email notifications are sent to contributors who are mentioned but are grouped if user would receive multiple for one event i.e. new comment and mention\r\n* An error message is shown and the submit button is disabled if a comment is over 500 characters but the validator on the model allows up to 1000 characters\r\n    * padding is added to the model validator to account for html elements that are converted to markdown before they are saved\r\n\r\nMentioning a contributor:\r\n![screen shot 2016-04-19 at 2 05 06 pm](https://cloud.githubusercontent.com/assets/7131985/14650020/d5107048-0637-11e6-97b4-6ca8e8d65084.png)\r\n\r\nEntering a comment longer than 500 characters:\r\n![screen shot 2016-04-19 at 2 04 36 pm](https://cloud.githubusercontent.com/assets/7131985/14650019/d506f34c-0637-11e6-99d5-54764dfb5ffd.png)\r\n\r\n## Possible additions\r\n* Emojis PR #5418 \r\n\r\n## Side Effects\r\n* change comments template from textareas to ContentEditable divs \r\n    * support keeping track of users who have been mentioned\r\n    * does not allow partial deletion of the mention\r\n    * can cause some unexpected behavior with pasting/arrow keys/enter\r\n* add dependency At.js\r\n    * provide @/+ functionality\r\n* add new_mentions & old_mentions to the comment model\r\n    * support determining who is a new mention after editing so contributors are not notified multiple times for the same comment\r\n   * new_mentions is a required field so it must be passed as an attribute or the request will fail\r\n* add new notification types and email templates\r\n    * mention notifications can occur on creation or on edit while comments only notify subscribers on creation\r\n   * comments and mentions have different notification settings\r\n   * currently the mentions are all of the 'email_transactional' notification_type\r\n* a user could submit a comment with up to 1000 characters using the API","created_at":"2016-04-27T15:09:58Z","updated_at":"2016-06-07T19:03:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1b22f263ce8dfe5beebd58d2d457babdae52c2a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/leb2dg/osf.io/pulls/14/commits","review_comments_url":"https://api.github.com/repos/leb2dg/osf.io/pulls/14/comments","review_comment_url":"https://api.github.com/repos/leb2dg/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14/comments","statuses_url":"https://api.github.com/repos/leb2dg/osf.io/statuses/0c51337fa1034dbeac751a98da63b3bc8492fc06","head":{"label":"leb2dg:feature/mention-notifications","ref":"feature/mention-notifications","sha":"0c51337fa1034dbeac751a98da63b3bc8492fc06","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"repo":{"id":36022297,"name":"osf.io","full_name":"leb2dg/osf.io","owner":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leb2dg/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/leb2dg/osf.io","forks_url":"https://api.github.com/repos/leb2dg/osf.io/forks","keys_url":"https://api.github.com/repos/leb2dg/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leb2dg/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leb2dg/osf.io/teams","hooks_url":"https://api.github.com/repos/leb2dg/osf.io/hooks","issue_events_url":"https://api.github.com/repos/leb2dg/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/leb2dg/osf.io/events","assignees_url":"https://api.github.com/repos/leb2dg/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/leb2dg/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/leb2dg/osf.io/tags","blobs_url":"https://api.github.com/repos/leb2dg/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leb2dg/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leb2dg/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/leb2dg/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leb2dg/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/leb2dg/osf.io/languages","stargazers_url":"https://api.github.com/repos/leb2dg/osf.io/stargazers","contributors_url":"https://api.github.com/repos/leb2dg/osf.io/contributors","subscribers_url":"https://api.github.com/repos/leb2dg/osf.io/subscribers","subscription_url":"https://api.github.com/repos/leb2dg/osf.io/subscription","commits_url":"https://api.github.com/repos/leb2dg/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/leb2dg/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/leb2dg/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/leb2dg/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/leb2dg/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/leb2dg/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leb2dg/osf.io/merges","archive_url":"https://api.github.com/repos/leb2dg/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leb2dg/osf.io/downloads","issues_url":"https://api.github.com/repos/leb2dg/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/leb2dg/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/leb2dg/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/leb2dg/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leb2dg/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/leb2dg/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/leb2dg/osf.io/deployments","created_at":"2015-05-21T15:51:35Z","updated_at":"2016-04-05T21:45:08Z","pushed_at":"2016-06-07T18:21:01Z","git_url":"git://github.com/leb2dg/osf.io.git","ssh_url":"git@github.com:leb2dg/osf.io.git","clone_url":"https://github.com/leb2dg/osf.io.git","svn_url":"https://github.com/leb2dg/osf.io","homepage":"http://osf.io","size":132935,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"leb2dg:feature/global-notification-settings","ref":"feature/global-notification-settings","sha":"c4e55c10c3a6394c5f1f5fa3734285d41c66cea8","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"repo":{"id":36022297,"name":"osf.io","full_name":"leb2dg/osf.io","owner":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leb2dg/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/leb2dg/osf.io","forks_url":"https://api.github.com/repos/leb2dg/osf.io/forks","keys_url":"https://api.github.com/repos/leb2dg/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leb2dg/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leb2dg/osf.io/teams","hooks_url":"https://api.github.com/repos/leb2dg/osf.io/hooks","issue_events_url":"https://api.github.com/repos/leb2dg/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/leb2dg/osf.io/events","assignees_url":"https://api.github.com/repos/leb2dg/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/leb2dg/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/leb2dg/osf.io/tags","blobs_url":"https://api.github.com/repos/leb2dg/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leb2dg/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leb2dg/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/leb2dg/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leb2dg/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/leb2dg/osf.io/languages","stargazers_url":"https://api.github.com/repos/leb2dg/osf.io/stargazers","contributors_url":"https://api.github.com/repos/leb2dg/osf.io/contributors","subscribers_url":"https://api.github.com/repos/leb2dg/osf.io/subscribers","subscription_url":"https://api.github.com/repos/leb2dg/osf.io/subscription","commits_url":"https://api.github.com/repos/leb2dg/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/leb2dg/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/leb2dg/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/leb2dg/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/leb2dg/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/leb2dg/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leb2dg/osf.io/merges","archive_url":"https://api.github.com/repos/leb2dg/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leb2dg/osf.io/downloads","issues_url":"https://api.github.com/repos/leb2dg/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/leb2dg/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/leb2dg/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/leb2dg/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leb2dg/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/leb2dg/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/leb2dg/osf.io/deployments","created_at":"2015-05-21T15:51:35Z","updated_at":"2016-04-05T21:45:08Z","pushed_at":"2016-06-07T18:21:01Z","git_url":"git://github.com/leb2dg/osf.io.git","ssh_url":"git@github.com:leb2dg/osf.io.git","clone_url":"https://github.com/leb2dg/osf.io.git","svn_url":"https://github.com/leb2dg/osf.io","homepage":"http://osf.io","size":132935,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/14"},"html":{"href":"https://github.com/leb2dg/osf.io/pull/14"},"issue":{"href":"https://api.github.com/repos/leb2dg/osf.io/issues/14"},"comments":{"href":"https://api.github.com/repos/leb2dg/osf.io/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leb2dg/osf.io/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/leb2dg/osf.io/statuses/0c51337fa1034dbeac751a98da63b3bc8492fc06"}}}}
{"actor":{"display_login":"whit537"}}