GitHub PullRequestReviewCommentEvent at 2014-07-14 16:15:19
Repository: oneanddone
Actor: Osmose
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/oneanddone/pulls/comments/14886824","id":14886824,"diff_hunk":"@@ -10,3 +17,23 @@ def get_object_or_none(model_class, **filters):\n         return model_class.objects.get(**filters)\n     except (model_class.DoesNotExist, model_class.MultipleObjectsReturned):\n         return None\n+\n+\n+def check_notification(request):\n+    \"\"\"\n+    Check to see if a notification is needed\n+    and if so return notification data.\n+    \"\"\"\n+    if not request.user.is_authenticated():\n+        return False\n+    for pattern in ('browserid', 'notification'):\n+        if pattern in request.path:\n+            return False\n+    if request.user.attempts_in_progress:\n+        task_attempt = request.user.attempts_in_progress[0]\n+        if task_attempt.state == TaskAttempt.STARTED and not task_attempt.task.is_available:\n+            messages.error(request, _(","path":"oneanddone/base/util.py","position":33,"original_position":33,"commit_id":"0156cf7af509bece147e869e5def6f35aa8a8cd9","original_commit_id":"0156cf7af509bece147e869e5def6f35aa8a8cd9","user":{"login":"Osmose","id":193106,"avatar_url":"https://avatars.githubusercontent.com/u/193106?","gravatar_id":"817d3482f5d376f7665718496ad7e3c6","url":"https://api.github.com/users/Osmose","html_url":"https://github.com/Osmose","followers_url":"https://api.github.com/users/Osmose/followers","following_url":"https://api.github.com/users/Osmose/following{/other_user}","gists_url":"https://api.github.com/users/Osmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Osmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Osmose/subscriptions","organizations_url":"https://api.github.com/users/Osmose/orgs","repos_url":"https://api.github.com/users/Osmose/repos","events_url":"https://api.github.com/users/Osmose/events{/privacy}","received_events_url":"https://api.github.com/users/Osmose/received_events","type":"User","site_admin":false},"body":"I wouldn't use the messages framework for this. It makes it really awkward (especially with that template that asks the user, below the message, to read the message). Instead, find a way to make the template show the message itself. Perhaps don't bother with a generic notification at this point and just alter the template directly?","created_at":"2014-07-14T16:15:19Z","updated_at":"2014-07-14T16:15:19Z","html_url":"https://github.com/mozilla/oneanddone/pull/155#discussion_r14886824","pull_request_url":"https://api.github.com/repos/mozilla/oneanddone/pulls/155","_links":{"self":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/comments/14886824"},"html":{"href":"https://github.com/mozilla/oneanddone/pull/155#discussion_r14886824"},"pull_request":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/155"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/oneanddone/pulls/155","id":18236038,"html_url":"https://github.com/mozilla/oneanddone/pull/155","diff_url":"https://github.com/mozilla/oneanddone/pull/155.diff","patch_url":"https://github.com/mozilla/oneanddone/pull/155.patch","issue_url":"https://api.github.com/repos/mozilla/oneanddone/issues/155","number":155,"state":"open","title":"Bug 1030996 - Add in tool notifications","user":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?","gravatar_id":"95d98aa8f56318b4e22aab08425ee792","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"body":"This is a draft for feedback","created_at":"2014-07-10T18:06:23Z","updated_at":"2014-07-14T16:15:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4c384999c707705715a417acbe157a7e6b7b5c6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/oneanddone/pulls/155/commits","review_comments_url":"https://api.github.com/repos/mozilla/oneanddone/pulls/155/comments","review_comment_url":"https://api.github.com/repos/mozilla/oneanddone/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/oneanddone/issues/155/comments","statuses_url":"https://api.github.com/repos/mozilla/oneanddone/statuses/0156cf7af509bece147e869e5def6f35aa8a8cd9","head":{"label":"bobsilverberg:notifications","ref":"notifications","sha":"0156cf7af509bece147e869e5def6f35aa8a8cd9","user":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?","gravatar_id":"95d98aa8f56318b4e22aab08425ee792","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"repo":{"id":14537612,"name":"oneanddone","full_name":"bobsilverberg/oneanddone","owner":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?","gravatar_id":"95d98aa8f56318b4e22aab08425ee792","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bobsilverberg/oneanddone","description":"The \"One and Done\" initiative, previously known as \"QA Taskboard\", is a workflow where Mozilla community contributors can pick tasks and work on them - one at a time, one day at a time - and feel good about doing them.","fork":true,"url":"https://api.github.com/repos/bobsilverberg/oneanddone","forks_url":"https://api.github.com/repos/bobsilverberg/oneanddone/forks","keys_url":"https://api.github.com/repos/bobsilverberg/oneanddone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobsilverberg/oneanddone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobsilverberg/oneanddone/teams","hooks_url":"https://api.github.com/repos/bobsilverberg/oneanddone/hooks","issue_events_url":"https://api.github.com/repos/bobsilverberg/oneanddone/issues/events{/number}","events_url":"https://api.github.com/repos/bobsilverberg/oneanddone/events","assignees_url":"https://api.github.com/repos/bobsilverberg/oneanddone/assignees{/user}","branches_url":"https://api.github.com/repos/bobsilverberg/oneanddone/branches{/branch}","tags_url":"https://api.github.com/repos/bobsilverberg/oneanddone/tags","blobs_url":"https://api.github.com/repos/bobsilverberg/oneanddone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobsilverberg/oneanddone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobsilverberg/oneanddone/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobsilverberg/oneanddone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobsilverberg/oneanddone/statuses/{sha}","languages_url":"https://api.github.com/repos/bobsilverberg/oneanddone/languages","stargazers_url":"https://api.github.com/repos/bobsilverberg/oneanddone/stargazers","contributors_url":"https://api.github.com/repos/bobsilverberg/oneanddone/contributors","subscribers_url":"https://api.github.com/repos/bobsilverberg/oneanddone/subscribers","subscription_url":"https://api.github.com/repos/bobsilverberg/oneanddone/subscription","commits_url":"https://api.github.com/repos/bobsilverberg/oneanddone/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobsilverberg/oneanddone/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobsilverberg/oneanddone/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobsilverberg/oneanddone/issues/comments/{number}","contents_url":"https://api.github.com/repos/bobsilverberg/oneanddone/contents/{+path}","compare_url":"https://api.github.com/repos/bobsilverberg/oneanddone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobsilverberg/oneanddone/merges","archive_url":"https://api.github.com/repos/bobsilverberg/oneanddone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobsilverberg/oneanddone/downloads","issues_url":"https://api.github.com/repos/bobsilverberg/oneanddone/issues{/number}","pulls_url":"https://api.github.com/repos/bobsilverberg/oneanddone/pulls{/number}","milestones_url":"https://api.github.com/repos/bobsilverberg/oneanddone/milestones{/number}","notifications_url":"https://api.github.com/repos/bobsilverberg/oneanddone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobsilverberg/oneanddone/labels{/name}","releases_url":"https://api.github.com/repos/bobsilverberg/oneanddone/releases{/id}","created_at":"2013-11-19T20:51:41Z","updated_at":"2014-06-25T16:24:03Z","pushed_at":"2014-07-14T02:35:35Z","git_url":"git://github.com/bobsilverberg/oneanddone.git","ssh_url":"git@github.com:bobsilverberg/oneanddone.git","clone_url":"https://github.com/bobsilverberg/oneanddone.git","svn_url":"https://github.com/bobsilverberg/oneanddone","homepage":null,"size":6921,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"d1109e17586264f208516a19dcb83ee9df05b495","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":6637799,"name":"oneanddone","full_name":"mozilla/oneanddone","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/oneanddone","description":"The \"One and Done\" initiative, previously known as \"QA Taskboard\", is a workflow where Mozilla community contributors can pick tasks and work on them - one at a time, one day at a time - and feel good about doing them.","fork":false,"url":"https://api.github.com/repos/mozilla/oneanddone","forks_url":"https://api.github.com/repos/mozilla/oneanddone/forks","keys_url":"https://api.github.com/repos/mozilla/oneanddone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/oneanddone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/oneanddone/teams","hooks_url":"https://api.github.com/repos/mozilla/oneanddone/hooks","issue_events_url":"https://api.github.com/repos/mozilla/oneanddone/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/oneanddone/events","assignees_url":"https://api.github.com/repos/mozilla/oneanddone/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/oneanddone/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/oneanddone/tags","blobs_url":"https://api.github.com/repos/mozilla/oneanddone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/oneanddone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/oneanddone/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/oneanddone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/oneanddone/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/oneanddone/languages","stargazers_url":"https://api.github.com/repos/mozilla/oneanddone/stargazers","contributors_url":"https://api.github.com/repos/mozilla/oneanddone/contributors","subscribers_url":"https://api.github.com/repos/mozilla/oneanddone/subscribers","subscription_url":"https://api.github.com/repos/mozilla/oneanddone/subscription","commits_url":"https://api.github.com/repos/mozilla/oneanddone/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/oneanddone/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/oneanddone/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/oneanddone/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/oneanddone/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/oneanddone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/oneanddone/merges","archive_url":"https://api.github.com/repos/mozilla/oneanddone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/oneanddone/downloads","issues_url":"https://api.github.com/repos/mozilla/oneanddone/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/oneanddone/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/oneanddone/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/oneanddone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/oneanddone/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/oneanddone/releases{/id}","created_at":"2012-11-11T11:33:56Z","updated_at":"2014-07-12T15:42:09Z","pushed_at":"2014-07-10T21:54:59Z","git_url":"git://github.com/mozilla/oneanddone.git","ssh_url":"git@github.com:mozilla/oneanddone.git","clone_url":"https://github.com/mozilla/oneanddone.git","svn_url":"https://github.com/mozilla/oneanddone","homepage":null,"size":7674,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":20,"mirror_url":null,"open_issues_count":5,"forks":20,"open_issues":5,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/155"},"html":{"href":"https://github.com/mozilla/oneanddone/pull/155"},"issue":{"href":"https://api.github.com/repos/mozilla/oneanddone/issues/155"},"comments":{"href":"https://api.github.com/repos/mozilla/oneanddone/issues/155/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/155/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/oneanddone/pulls/155/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/oneanddone/statuses/0156cf7af509bece147e869e5def6f35aa8a8cd9"}}}}