{"action":"created","comment":{"url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/comments/212589553","pull_request_review_id":149256071,"id":212589553,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjU4OTU1Mw==","diff_hunk":"@@ -335,9 +372,30 @@ def init(self):\n             async with conn.begin():\n                 await conn.execute(table.insert().values(id=row_id, revision=revision, data=data, search=search))\n                 await self._update_aux_tables(conn, resource_type, row_id, data)\n-\n+                listener_refs = [row.id async for row in conn.execute(\n+                    sa.select([\n+                        listeners.c.id,\n+                    ]).where(\n+                        sa.and_(\n+                            listeners.c.listen_on_type == resource_type,\n+                            sa.or_(\n+                                listeners.c.data.op('->')('notify_of_new') == 'true',\n+                                sa.and_(\n+                                    listeners.c.data.op('->')('notify_on_all') == 'true',\n+                                    sa.or_(\n+                                        listeners.c.data.op('->')('notify_of_new') == 'true',\n+                                        listeners.c.data.op('->')('notify_of_new') == None\n+                                    )\n+                                )\n+                            )\n+                        )\n+                    )\n+                )]\n+                await conn.execute(changes.insert().values(id=change_id, resource_id=row_id, resource_revision=revision, data=data, change_type='created', user=None, listeners=listener_refs))","path":"qvarn/backends/postgresql.py","position":274,"original_position":274,"commit_id":"a4c3b6853245dd0555df9be2b451dc6c34d46f85","original_commit_id":"a4c3b6853245dd0555df9be2b451dc6c34d46f85","user":{"login":"wandth","id":5240363,"node_id":"MDQ6VXNlcjUyNDAzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5240363?v=4","gravatar_id":"","url":"https://api.github.com/users/wandth","html_url":"https://github.com/wandth","followers_url":"https://api.github.com/users/wandth/followers","following_url":"https://api.github.com/users/wandth/following{/other_user}","gists_url":"https://api.github.com/users/wandth/gists{/gist_id}","starred_url":"https://api.github.com/users/wandth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandth/subscriptions","organizations_url":"https://api.github.com/users/wandth/orgs","repos_url":"https://api.github.com/users/wandth/repos","events_url":"https://api.github.com/users/wandth/events{/privacy}","received_events_url":"https://api.github.com/users/wandth/received_events","type":"User","site_admin":false},"body":"Ok. Thought so, but haven't dug into the authentication system of qvarn. All I saw is that the app gets a signed token, and no user credentials.","created_at":"2018-08-24T10:41:55Z","updated_at":"2018-08-24T10:41:55Z","html_url":"https://github.com/vaultit/qvarn-planb/pull/4#discussion_r212589553","pull_request_url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/comments/212589553"},"html":{"href":"https://github.com/vaultit/qvarn-planb/pull/4#discussion_r212589553"},"pull_request":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4"}},"in_reply_to_id":212323047},"pull_request":{"url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4","id":210391701,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMzkxNzAx","html_url":"https://github.com/vaultit/qvarn-planb/pull/4","diff_url":"https://github.com/vaultit/qvarn-planb/pull/4.diff","patch_url":"https://github.com/vaultit/qvarn-planb/pull/4.patch","issue_url":"https://api.github.com/repos/vaultit/qvarn-planb/issues/4","number":4,"state":"open","locked":false,"title":"Implemented qvarn notification feature","user":{"login":"wandth","id":5240363,"node_id":"MDQ6VXNlcjUyNDAzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5240363?v=4","gravatar_id":"","url":"https://api.github.com/users/wandth","html_url":"https://github.com/wandth","followers_url":"https://api.github.com/users/wandth/followers","following_url":"https://api.github.com/users/wandth/following{/other_user}","gists_url":"https://api.github.com/users/wandth/gists{/gist_id}","starred_url":"https://api.github.com/users/wandth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandth/subscriptions","organizations_url":"https://api.github.com/users/wandth/orgs","repos_url":"https://api.github.com/users/wandth/repos","events_url":"https://api.github.com/users/wandth/events{/privacy}","received_events_url":"https://api.github.com/users/wandth/received_events","type":"User","site_admin":false},"body":"Implemented qvarn notification feature based on https://raw.githubusercontent.com/vaultit/qvarn/master/docs/qvarn-api-doc/050-api-overview.yarn\r\n\r\n- Updated .gitignore to ignore Eclipse project files\r\n- Makefile has optional PYTHON_3.6 parameter and code for setting up\r\ndatabase\r\n- Implemented notifications view\r\n- Implemented notifications view tests\r\n- Notifications related updated to postgresql backend","created_at":"2018-08-23T09:51:28Z","updated_at":"2018-08-24T10:41:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"973a533d2eff7667e8e876f0974e17aa64505b35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4/commits","review_comments_url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4/comments","review_comment_url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vaultit/qvarn-planb/issues/4/comments","statuses_url":"https://api.github.com/repos/vaultit/qvarn-planb/statuses/a4c3b6853245dd0555df9be2b451dc6c34d46f85","head":{"label":"wandth:notifications","ref":"notifications","sha":"a4c3b6853245dd0555df9be2b451dc6c34d46f85","user":{"login":"wandth","id":5240363,"node_id":"MDQ6VXNlcjUyNDAzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5240363?v=4","gravatar_id":"","url":"https://api.github.com/users/wandth","html_url":"https://github.com/wandth","followers_url":"https://api.github.com/users/wandth/followers","following_url":"https://api.github.com/users/wandth/following{/other_user}","gists_url":"https://api.github.com/users/wandth/gists{/gist_id}","starred_url":"https://api.github.com/users/wandth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandth/subscriptions","organizations_url":"https://api.github.com/users/wandth/orgs","repos_url":"https://api.github.com/users/wandth/repos","events_url":"https://api.github.com/users/wandth/events{/privacy}","received_events_url":"https://api.github.com/users/wandth/received_events","type":"User","site_admin":false},"repo":{"id":145829906,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4Mjk5MDY=","name":"qvarn-planb","full_name":"wandth/qvarn-planb","owner":{"login":"wandth","id":5240363,"node_id":"MDQ6VXNlcjUyNDAzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5240363?v=4","gravatar_id":"","url":"https://api.github.com/users/wandth","html_url":"https://github.com/wandth","followers_url":"https://api.github.com/users/wandth/followers","following_url":"https://api.github.com/users/wandth/following{/other_user}","gists_url":"https://api.github.com/users/wandth/gists{/gist_id}","starred_url":"https://api.github.com/users/wandth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandth/subscriptions","organizations_url":"https://api.github.com/users/wandth/orgs","repos_url":"https://api.github.com/users/wandth/repos","events_url":"https://api.github.com/users/wandth/events{/privacy}","received_events_url":"https://api.github.com/users/wandth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wandth/qvarn-planb","description":"Experimental Qvarn API implementation","fork":true,"url":"https://api.github.com/repos/wandth/qvarn-planb","forks_url":"https://api.github.com/repos/wandth/qvarn-planb/forks","keys_url":"https://api.github.com/repos/wandth/qvarn-planb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wandth/qvarn-planb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wandth/qvarn-planb/teams","hooks_url":"https://api.github.com/repos/wandth/qvarn-planb/hooks","issue_events_url":"https://api.github.com/repos/wandth/qvarn-planb/issues/events{/number}","events_url":"https://api.github.com/repos/wandth/qvarn-planb/events","assignees_url":"https://api.github.com/repos/wandth/qvarn-planb/assignees{/user}","branches_url":"https://api.github.com/repos/wandth/qvarn-planb/branches{/branch}","tags_url":"https://api.github.com/repos/wandth/qvarn-planb/tags","blobs_url":"https://api.github.com/repos/wandth/qvarn-planb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wandth/qvarn-planb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wandth/qvarn-planb/git/refs{/sha}","trees_url":"https://api.github.com/repos/wandth/qvarn-planb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wandth/qvarn-planb/statuses/{sha}","languages_url":"https://api.github.com/repos/wandth/qvarn-planb/languages","stargazers_url":"https://api.github.com/repos/wandth/qvarn-planb/stargazers","contributors_url":"https://api.github.com/repos/wandth/qvarn-planb/contributors","subscribers_url":"https://api.github.com/repos/wandth/qvarn-planb/subscribers","subscription_url":"https://api.github.com/repos/wandth/qvarn-planb/subscription","commits_url":"https://api.github.com/repos/wandth/qvarn-planb/commits{/sha}","git_commits_url":"https://api.github.com/repos/wandth/qvarn-planb/git/commits{/sha}","comments_url":"https://api.github.com/repos/wandth/qvarn-planb/comments{/number}","issue_comment_url":"https://api.github.com/repos/wandth/qvarn-planb/issues/comments{/number}","contents_url":"https://api.github.com/repos/wandth/qvarn-planb/contents/{+path}","compare_url":"https://api.github.com/repos/wandth/qvarn-planb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wandth/qvarn-planb/merges","archive_url":"https://api.github.com/repos/wandth/qvarn-planb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wandth/qvarn-planb/downloads","issues_url":"https://api.github.com/repos/wandth/qvarn-planb/issues{/number}","pulls_url":"https://api.github.com/repos/wandth/qvarn-planb/pulls{/number}","milestones_url":"https://api.github.com/repos/wandth/qvarn-planb/milestones{/number}","notifications_url":"https://api.github.com/repos/wandth/qvarn-planb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wandth/qvarn-planb/labels{/name}","releases_url":"https://api.github.com/repos/wandth/qvarn-planb/releases{/id}","deployments_url":"https://api.github.com/repos/wandth/qvarn-planb/deployments","created_at":"2018-08-23T09:14:44Z","updated_at":"2018-08-23T09:14:46Z","pushed_at":"2018-08-23T09:49:00Z","git_url":"git://github.com/wandth/qvarn-planb.git","ssh_url":"git@github.com:wandth/qvarn-planb.git","clone_url":"https://github.com/wandth/qvarn-planb.git","svn_url":"https://github.com/wandth/qvarn-planb","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vaultit:notifications","ref":"notifications","sha":"106e56c178c764832afeedc4192d9e2057477231","user":{"login":"vaultit","id":29458299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDU4Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/29458299?v=4","gravatar_id":"","url":"https://api.github.com/users/vaultit","html_url":"https://github.com/vaultit","followers_url":"https://api.github.com/users/vaultit/followers","following_url":"https://api.github.com/users/vaultit/following{/other_user}","gists_url":"https://api.github.com/users/vaultit/gists{/gist_id}","starred_url":"https://api.github.com/users/vaultit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaultit/subscriptions","organizations_url":"https://api.github.com/users/vaultit/orgs","repos_url":"https://api.github.com/users/vaultit/repos","events_url":"https://api.github.com/users/vaultit/events{/privacy}","received_events_url":"https://api.github.com/users/vaultit/received_events","type":"Organization","site_admin":false},"repo":{"id":129104794,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkxMDQ3OTQ=","name":"qvarn-planb","full_name":"vaultit/qvarn-planb","owner":{"login":"vaultit","id":29458299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDU4Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/29458299?v=4","gravatar_id":"","url":"https://api.github.com/users/vaultit","html_url":"https://github.com/vaultit","followers_url":"https://api.github.com/users/vaultit/followers","following_url":"https://api.github.com/users/vaultit/following{/other_user}","gists_url":"https://api.github.com/users/vaultit/gists{/gist_id}","starred_url":"https://api.github.com/users/vaultit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaultit/subscriptions","organizations_url":"https://api.github.com/users/vaultit/orgs","repos_url":"https://api.github.com/users/vaultit/repos","events_url":"https://api.github.com/users/vaultit/events{/privacy}","received_events_url":"https://api.github.com/users/vaultit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vaultit/qvarn-planb","description":"Experimental Qvarn API implementation","fork":false,"url":"https://api.github.com/repos/vaultit/qvarn-planb","forks_url":"https://api.github.com/repos/vaultit/qvarn-planb/forks","keys_url":"https://api.github.com/repos/vaultit/qvarn-planb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaultit/qvarn-planb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaultit/qvarn-planb/teams","hooks_url":"https://api.github.com/repos/vaultit/qvarn-planb/hooks","issue_events_url":"https://api.github.com/repos/vaultit/qvarn-planb/issues/events{/number}","events_url":"https://api.github.com/repos/vaultit/qvarn-planb/events","assignees_url":"https://api.github.com/repos/vaultit/qvarn-planb/assignees{/user}","branches_url":"https://api.github.com/repos/vaultit/qvarn-planb/branches{/branch}","tags_url":"https://api.github.com/repos/vaultit/qvarn-planb/tags","blobs_url":"https://api.github.com/repos/vaultit/qvarn-planb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaultit/qvarn-planb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaultit/qvarn-planb/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaultit/qvarn-planb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaultit/qvarn-planb/statuses/{sha}","languages_url":"https://api.github.com/repos/vaultit/qvarn-planb/languages","stargazers_url":"https://api.github.com/repos/vaultit/qvarn-planb/stargazers","contributors_url":"https://api.github.com/repos/vaultit/qvarn-planb/contributors","subscribers_url":"https://api.github.com/repos/vaultit/qvarn-planb/subscribers","subscription_url":"https://api.github.com/repos/vaultit/qvarn-planb/subscription","commits_url":"https://api.github.com/repos/vaultit/qvarn-planb/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaultit/qvarn-planb/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaultit/qvarn-planb/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaultit/qvarn-planb/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaultit/qvarn-planb/contents/{+path}","compare_url":"https://api.github.com/repos/vaultit/qvarn-planb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaultit/qvarn-planb/merges","archive_url":"https://api.github.com/repos/vaultit/qvarn-planb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaultit/qvarn-planb/downloads","issues_url":"https://api.github.com/repos/vaultit/qvarn-planb/issues{/number}","pulls_url":"https://api.github.com/repos/vaultit/qvarn-planb/pulls{/number}","milestones_url":"https://api.github.com/repos/vaultit/qvarn-planb/milestones{/number}","notifications_url":"https://api.github.com/repos/vaultit/qvarn-planb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaultit/qvarn-planb/labels{/name}","releases_url":"https://api.github.com/repos/vaultit/qvarn-planb/releases{/id}","deployments_url":"https://api.github.com/repos/vaultit/qvarn-planb/deployments","created_at":"2018-04-11T14:15:32Z","updated_at":"2018-06-13T08:56:15Z","pushed_at":"2018-08-23T09:51:29Z","git_url":"git://github.com/vaultit/qvarn-planb.git","ssh_url":"git@github.com:vaultit/qvarn-planb.git","clone_url":"https://github.com/vaultit/qvarn-planb.git","svn_url":"https://github.com/vaultit/qvarn-planb","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4"},"html":{"href":"https://github.com/vaultit/qvarn-planb/pull/4"},"issue":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/issues/4"},"comments":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/vaultit/qvarn-planb/statuses/a4c3b6853245dd0555df9be2b451dc6c34d46f85"}},"author_association":"NONE"}}
{"actor":{"display_login":"wandth"}}