{"action":"created","comment":{"url":"https://api.github.com/repos/dradis/dradis-ce/pulls/comments/202608999","pull_request_review_id":137331264,"id":202608999,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjYwODk5OQ==","diff_hunk":"@@ -0,0 +1,23 @@\n+class ActivityTrackingJob < ApplicationJob\n+  queue_as :dradis_project\n+\n+  def perform(action:, trackable_id:, trackable_type:, user:)","path":"app/jobs/activity_tracking_job.rb","position":4,"original_position":4,"commit_id":"7c9ac098daa88182911635c91bc85a3dfaa5918e","original_commit_id":"7c9ac098daa88182911635c91bc85a3dfaa5918e","user":{"login":"aapomm","id":1908272,"node_id":"MDQ6VXNlcjE5MDgyNzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1908272?v=4","gravatar_id":"","url":"https://api.github.com/users/aapomm","html_url":"https://github.com/aapomm","followers_url":"https://api.github.com/users/aapomm/followers","following_url":"https://api.github.com/users/aapomm/following{/other_user}","gists_url":"https://api.github.com/users/aapomm/gists{/gist_id}","starred_url":"https://api.github.com/users/aapomm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aapomm/subscriptions","organizations_url":"https://api.github.com/users/aapomm/orgs","repos_url":"https://api.github.com/users/aapomm/repos","events_url":"https://api.github.com/users/aapomm/events{/privacy}","received_events_url":"https://api.github.com/users/aapomm/received_events","type":"User","site_admin":false},"body":"just pass the user email here?","created_at":"2018-07-16T08:47:43Z","updated_at":"2018-07-16T08:48:35Z","html_url":"https://github.com/dradis/dradis-ce/pull/294#discussion_r202608999","pull_request_url":"https://api.github.com/repos/dradis/dradis-ce/pulls/294","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/comments/202608999"},"html":{"href":"https://github.com/dradis/dradis-ce/pull/294#discussion_r202608999"},"pull_request":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/dradis/dradis-ce/pulls/294","id":200640498,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNjQwNDk4","html_url":"https://github.com/dradis/dradis-ce/pull/294","diff_url":"https://github.com/dradis/dradis-ce/pull/294.diff","patch_url":"https://github.com/dradis/dradis-ce/pull/294.patch","issue_url":"https://api.github.com/repos/dradis/dradis-ce/issues/294","number":294,"state":"open","locked":false,"title":"Notifications creation","user":{"login":"dormi","id":85766,"node_id":"MDQ6VXNlcjg1NzY2","avatar_url":"https://avatars1.githubusercontent.com/u/85766?v=4","gravatar_id":"","url":"https://api.github.com/users/dormi","html_url":"https://github.com/dormi","followers_url":"https://api.github.com/users/dormi/followers","following_url":"https://api.github.com/users/dormi/following{/other_user}","gists_url":"https://api.github.com/users/dormi/gists{/gist_id}","starred_url":"https://api.github.com/users/dormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dormi/subscriptions","organizations_url":"https://api.github.com/users/dormi/orgs","repos_url":"https://api.github.com/users/dormi/repos","events_url":"https://api.github.com/users/dormi/events{/privacy}","received_events_url":"https://api.github.com/users/dormi/received_events","type":"User","site_admin":false},"body":"### Spec\r\nWe comment on a model, let's say an issue, that we didn't create.\r\nNotifications must be stored on db, so the user that created that issue and the rest of subscribers may see it in their notifications list.\r\n\r\nNo notification should be created for the comment creator.\r\n\r\nWe may trigger the notifications creation when activity is created. But it must be done in the background.\r\n\r\n**Proposed solution**\r\nWe may schedule bg job from the ActivityTracking concern, that creates the necessary notifications.\r\n\r\n\r\n### How to test\r\nIf https://github.com/dradis/dradis-ce/pull/291 is merged:\r\n  - Create a comment on an issue\r\n  - Notifications should be created in db for all users subscribed to that issue except for the commenter\r\n\r\nElse:\r\n  - Specs should passs","created_at":"2018-07-11T09:35:10Z","updated_at":"2018-07-16T08:48:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7aa172d8b2bdb8c7128223575f9bf43c73a801ca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dradis/dradis-ce/pulls/294/commits","review_comments_url":"https://api.github.com/repos/dradis/dradis-ce/pulls/294/comments","review_comment_url":"https://api.github.com/repos/dradis/dradis-ce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dradis/dradis-ce/issues/294/comments","statuses_url":"https://api.github.com/repos/dradis/dradis-ce/statuses/7c9ac098daa88182911635c91bc85a3dfaa5918e","head":{"label":"dradis:notifications-creation","ref":"notifications-creation","sha":"7c9ac098daa88182911635c91bc85a3dfaa5918e","user":{"login":"dradis","id":369701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTcwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/369701?v=4","gravatar_id":"","url":"https://api.github.com/users/dradis","html_url":"https://github.com/dradis","followers_url":"https://api.github.com/users/dradis/followers","following_url":"https://api.github.com/users/dradis/following{/other_user}","gists_url":"https://api.github.com/users/dradis/gists{/gist_id}","starred_url":"https://api.github.com/users/dradis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dradis/subscriptions","organizations_url":"https://api.github.com/users/dradis/orgs","repos_url":"https://api.github.com/users/dradis/repos","events_url":"https://api.github.com/users/dradis/events{/privacy}","received_events_url":"https://api.github.com/users/dradis/received_events","type":"Organization","site_admin":false},"repo":{"id":50029969,"node_id":"MDEwOlJlcG9zaXRvcnk1MDAyOTk2OQ==","name":"dradis-ce","full_name":"dradis/dradis-ce","owner":{"login":"dradis","id":369701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTcwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/369701?v=4","gravatar_id":"","url":"https://api.github.com/users/dradis","html_url":"https://github.com/dradis","followers_url":"https://api.github.com/users/dradis/followers","following_url":"https://api.github.com/users/dradis/following{/other_user}","gists_url":"https://api.github.com/users/dradis/gists{/gist_id}","starred_url":"https://api.github.com/users/dradis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dradis/subscriptions","organizations_url":"https://api.github.com/users/dradis/orgs","repos_url":"https://api.github.com/users/dradis/repos","events_url":"https://api.github.com/users/dradis/events{/privacy}","received_events_url":"https://api.github.com/users/dradis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dradis/dradis-ce","description":"Dradis Framework: Colllaboration and reporting for IT Security teams","fork":false,"url":"https://api.github.com/repos/dradis/dradis-ce","forks_url":"https://api.github.com/repos/dradis/dradis-ce/forks","keys_url":"https://api.github.com/repos/dradis/dradis-ce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dradis/dradis-ce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dradis/dradis-ce/teams","hooks_url":"https://api.github.com/repos/dradis/dradis-ce/hooks","issue_events_url":"https://api.github.com/repos/dradis/dradis-ce/issues/events{/number}","events_url":"https://api.github.com/repos/dradis/dradis-ce/events","assignees_url":"https://api.github.com/repos/dradis/dradis-ce/assignees{/user}","branches_url":"https://api.github.com/repos/dradis/dradis-ce/branches{/branch}","tags_url":"https://api.github.com/repos/dradis/dradis-ce/tags","blobs_url":"https://api.github.com/repos/dradis/dradis-ce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dradis/dradis-ce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dradis/dradis-ce/git/refs{/sha}","trees_url":"https://api.github.com/repos/dradis/dradis-ce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dradis/dradis-ce/statuses/{sha}","languages_url":"https://api.github.com/repos/dradis/dradis-ce/languages","stargazers_url":"https://api.github.com/repos/dradis/dradis-ce/stargazers","contributors_url":"https://api.github.com/repos/dradis/dradis-ce/contributors","subscribers_url":"https://api.github.com/repos/dradis/dradis-ce/subscribers","subscription_url":"https://api.github.com/repos/dradis/dradis-ce/subscription","commits_url":"https://api.github.com/repos/dradis/dradis-ce/commits{/sha}","git_commits_url":"https://api.github.com/repos/dradis/dradis-ce/git/commits{/sha}","comments_url":"https://api.github.com/repos/dradis/dradis-ce/comments{/number}","issue_comment_url":"https://api.github.com/repos/dradis/dradis-ce/issues/comments{/number}","contents_url":"https://api.github.com/repos/dradis/dradis-ce/contents/{+path}","compare_url":"https://api.github.com/repos/dradis/dradis-ce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dradis/dradis-ce/merges","archive_url":"https://api.github.com/repos/dradis/dradis-ce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dradis/dradis-ce/downloads","issues_url":"https://api.github.com/repos/dradis/dradis-ce/issues{/number}","pulls_url":"https://api.github.com/repos/dradis/dradis-ce/pulls{/number}","milestones_url":"https://api.github.com/repos/dradis/dradis-ce/milestones{/number}","notifications_url":"https://api.github.com/repos/dradis/dradis-ce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dradis/dradis-ce/labels{/name}","releases_url":"https://api.github.com/repos/dradis/dradis-ce/releases{/id}","deployments_url":"https://api.github.com/repos/dradis/dradis-ce/deployments","created_at":"2016-01-20T12:54:45Z","updated_at":"2018-07-14T16:38:01Z","pushed_at":"2018-07-16T08:19:58Z","git_url":"git://github.com/dradis/dradis-ce.git","ssh_url":"git@github.com:dradis/dradis-ce.git","clone_url":"https://github.com/dradis/dradis-ce.git","svn_url":"https://github.com/dradis/dradis-ce","homepage":"http://dradisframework.org","size":1928,"stargazers_count":241,"watchers_count":241,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":92,"open_issues":44,"watchers":241,"default_branch":"master"}},"base":{"label":"dradis:notifications-feature","ref":"notifications-feature","sha":"ef5bd1b8f85ea231da9138d508514de1101818a3","user":{"login":"dradis","id":369701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTcwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/369701?v=4","gravatar_id":"","url":"https://api.github.com/users/dradis","html_url":"https://github.com/dradis","followers_url":"https://api.github.com/users/dradis/followers","following_url":"https://api.github.com/users/dradis/following{/other_user}","gists_url":"https://api.github.com/users/dradis/gists{/gist_id}","starred_url":"https://api.github.com/users/dradis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dradis/subscriptions","organizations_url":"https://api.github.com/users/dradis/orgs","repos_url":"https://api.github.com/users/dradis/repos","events_url":"https://api.github.com/users/dradis/events{/privacy}","received_events_url":"https://api.github.com/users/dradis/received_events","type":"Organization","site_admin":false},"repo":{"id":50029969,"node_id":"MDEwOlJlcG9zaXRvcnk1MDAyOTk2OQ==","name":"dradis-ce","full_name":"dradis/dradis-ce","owner":{"login":"dradis","id":369701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTcwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/369701?v=4","gravatar_id":"","url":"https://api.github.com/users/dradis","html_url":"https://github.com/dradis","followers_url":"https://api.github.com/users/dradis/followers","following_url":"https://api.github.com/users/dradis/following{/other_user}","gists_url":"https://api.github.com/users/dradis/gists{/gist_id}","starred_url":"https://api.github.com/users/dradis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dradis/subscriptions","organizations_url":"https://api.github.com/users/dradis/orgs","repos_url":"https://api.github.com/users/dradis/repos","events_url":"https://api.github.com/users/dradis/events{/privacy}","received_events_url":"https://api.github.com/users/dradis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dradis/dradis-ce","description":"Dradis Framework: Colllaboration and reporting for IT Security teams","fork":false,"url":"https://api.github.com/repos/dradis/dradis-ce","forks_url":"https://api.github.com/repos/dradis/dradis-ce/forks","keys_url":"https://api.github.com/repos/dradis/dradis-ce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dradis/dradis-ce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dradis/dradis-ce/teams","hooks_url":"https://api.github.com/repos/dradis/dradis-ce/hooks","issue_events_url":"https://api.github.com/repos/dradis/dradis-ce/issues/events{/number}","events_url":"https://api.github.com/repos/dradis/dradis-ce/events","assignees_url":"https://api.github.com/repos/dradis/dradis-ce/assignees{/user}","branches_url":"https://api.github.com/repos/dradis/dradis-ce/branches{/branch}","tags_url":"https://api.github.com/repos/dradis/dradis-ce/tags","blobs_url":"https://api.github.com/repos/dradis/dradis-ce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dradis/dradis-ce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dradis/dradis-ce/git/refs{/sha}","trees_url":"https://api.github.com/repos/dradis/dradis-ce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dradis/dradis-ce/statuses/{sha}","languages_url":"https://api.github.com/repos/dradis/dradis-ce/languages","stargazers_url":"https://api.github.com/repos/dradis/dradis-ce/stargazers","contributors_url":"https://api.github.com/repos/dradis/dradis-ce/contributors","subscribers_url":"https://api.github.com/repos/dradis/dradis-ce/subscribers","subscription_url":"https://api.github.com/repos/dradis/dradis-ce/subscription","commits_url":"https://api.github.com/repos/dradis/dradis-ce/commits{/sha}","git_commits_url":"https://api.github.com/repos/dradis/dradis-ce/git/commits{/sha}","comments_url":"https://api.github.com/repos/dradis/dradis-ce/comments{/number}","issue_comment_url":"https://api.github.com/repos/dradis/dradis-ce/issues/comments{/number}","contents_url":"https://api.github.com/repos/dradis/dradis-ce/contents/{+path}","compare_url":"https://api.github.com/repos/dradis/dradis-ce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dradis/dradis-ce/merges","archive_url":"https://api.github.com/repos/dradis/dradis-ce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dradis/dradis-ce/downloads","issues_url":"https://api.github.com/repos/dradis/dradis-ce/issues{/number}","pulls_url":"https://api.github.com/repos/dradis/dradis-ce/pulls{/number}","milestones_url":"https://api.github.com/repos/dradis/dradis-ce/milestones{/number}","notifications_url":"https://api.github.com/repos/dradis/dradis-ce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dradis/dradis-ce/labels{/name}","releases_url":"https://api.github.com/repos/dradis/dradis-ce/releases{/id}","deployments_url":"https://api.github.com/repos/dradis/dradis-ce/deployments","created_at":"2016-01-20T12:54:45Z","updated_at":"2018-07-14T16:38:01Z","pushed_at":"2018-07-16T08:19:58Z","git_url":"git://github.com/dradis/dradis-ce.git","ssh_url":"git@github.com:dradis/dradis-ce.git","clone_url":"https://github.com/dradis/dradis-ce.git","svn_url":"https://github.com/dradis/dradis-ce","homepage":"http://dradisframework.org","size":1928,"stargazers_count":241,"watchers_count":241,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":92,"open_issues":44,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/294"},"html":{"href":"https://github.com/dradis/dradis-ce/pull/294"},"issue":{"href":"https://api.github.com/repos/dradis/dradis-ce/issues/294"},"comments":{"href":"https://api.github.com/repos/dradis/dradis-ce/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/294/comments"},"review_comment":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dradis/dradis-ce/pulls/294/commits"},"statuses":{"href":"https://api.github.com/repos/dradis/dradis-ce/statuses/7c9ac098daa88182911635c91bc85a3dfaa5918e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aapomm"}}