{"action":"created","comment":{"url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/comments/212695112","pull_request_review_id":149386240,"id":212695112,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjY5NTExMg==","diff_hunk":"@@ -13,6 +15,7 @@\n \n # add your model's MetaData object here\n # for 'autogenerate' support\n+sys.path.append(os.getcwd())","path":"alembic/env.py","position":13,"original_position":13,"commit_id":"a4bd73b1206a09d5d1c2505816ad3a79c491fb46","original_commit_id":"a4bd73b1206a09d5d1c2505816ad3a79c491fb46","user":{"login":"joshuathayer","id":103802,"node_id":"MDQ6VXNlcjEwMzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/103802?v=4","gravatar_id":"","url":"https://api.github.com/users/joshuathayer","html_url":"https://github.com/joshuathayer","followers_url":"https://api.github.com/users/joshuathayer/followers","following_url":"https://api.github.com/users/joshuathayer/following{/other_user}","gists_url":"https://api.github.com/users/joshuathayer/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuathayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuathayer/subscriptions","organizations_url":"https://api.github.com/users/joshuathayer/orgs","repos_url":"https://api.github.com/users/joshuathayer/repos","events_url":"https://api.github.com/users/joshuathayer/events{/privacy}","received_events_url":"https://api.github.com/users/joshuathayer/received_events","type":"User","site_admin":false},"body":"Yeah, good catch. Thanks.","created_at":"2018-08-24T17:13:08Z","updated_at":"2018-08-24T17:13:08Z","html_url":"https://github.com/freedomofpress/securedrop-client/pull/10#discussion_r212695112","pull_request_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/comments/212695112"},"html":{"href":"https://github.com/freedomofpress/securedrop-client/pull/10#discussion_r212695112"},"pull_request":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10"}},"in_reply_to_id":212599898},"pull_request":{"url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10","id":210604727,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNjA0NzI3","html_url":"https://github.com/freedomofpress/securedrop-client/pull/10","diff_url":"https://github.com/freedomofpress/securedrop-client/pull/10.diff","patch_url":"https://github.com/freedomofpress/securedrop-client/pull/10.patch","issue_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/10","number":10,"state":"open","locked":false,"title":"make alembic happy for josh","user":{"login":"joshuathayer","id":103802,"node_id":"MDQ6VXNlcjEwMzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/103802?v=4","gravatar_id":"","url":"https://api.github.com/users/joshuathayer","html_url":"https://github.com/joshuathayer","followers_url":"https://api.github.com/users/joshuathayer/followers","following_url":"https://api.github.com/users/joshuathayer/following{/other_user}","gists_url":"https://api.github.com/users/joshuathayer/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuathayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuathayer/subscriptions","organizations_url":"https://api.github.com/users/joshuathayer/orgs","repos_url":"https://api.github.com/users/joshuathayer/repos","events_url":"https://api.github.com/users/joshuathayer/events{/privacy}","received_events_url":"https://api.github.com/users/joshuathayer/received_events","type":"User","site_admin":false},"body":"For some reason in my environment running `alembic` lead to errors where `securedrop_client/models` was not able to be found. This looks like https://stackoverflow.com/questions/15648284/alembic-alembic-revision-says-import-error/15734665#15734665, and is solved here in a similar way (explicitly adding the path to the project root to `sys.path`. It's not clear why alembic works for others without this hack.\r\n\r\nThis PR also removes logic from `models.py` whereby the DB would be created automatically if it didn't already exist. A new DB is made (even if the .sqlite file doesn't exist) from running `alembic upgrade head` in a freshly-checked-out repo.","created_at":"2018-08-23T23:45:28Z","updated_at":"2018-08-24T17:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f03ae3a04bb811d51fc468e8122fd9116dec2faa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"redshiftzero","id":7832803,"node_id":"MDQ6VXNlcjc4MzI4MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/7832803?v=4","gravatar_id":"","url":"https://api.github.com/users/redshiftzero","html_url":"https://github.com/redshiftzero","followers_url":"https://api.github.com/users/redshiftzero/followers","following_url":"https://api.github.com/users/redshiftzero/following{/other_user}","gists_url":"https://api.github.com/users/redshiftzero/gists{/gist_id}","starred_url":"https://api.github.com/users/redshiftzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redshiftzero/subscriptions","organizations_url":"https://api.github.com/users/redshiftzero/orgs","repos_url":"https://api.github.com/users/redshiftzero/repos","events_url":"https://api.github.com/users/redshiftzero/events{/privacy}","received_events_url":"https://api.github.com/users/redshiftzero/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10/commits","review_comments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10/comments","review_comment_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/10/comments","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop-client/statuses/a4bd73b1206a09d5d1c2505816ad3a79c491fb46","head":{"label":"freedomofpress:bug_add_cwd_to_path","ref":"bug_add_cwd_to_path","sha":"a4bd73b1206a09d5d1c2505816ad3a79c491fb46","user":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":141504341,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MDQzNDE=","name":"securedrop-client","full_name":"freedomofpress/securedrop-client","owner":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop-client","description":"SecureDrop Qubes client","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop-client","forks_url":"https://api.github.com/repos/freedomofpress/securedrop-client/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop-client/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop-client/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop-client/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop-client/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop-client/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop-client/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop-client/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop-client/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop-client/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop-client/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop-client/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop-client/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop-client/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop-client/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop-client/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop-client/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop-client/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop-client/releases{/id}","deployments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/deployments","created_at":"2018-07-19T00:31:37Z","updated_at":"2018-08-18T16:16:24Z","pushed_at":"2018-08-24T01:44:01Z","git_url":"git://github.com/freedomofpress/securedrop-client.git","ssh_url":"git@github.com:freedomofpress/securedrop-client.git","clone_url":"https://github.com/freedomofpress/securedrop-client.git","svn_url":"https://github.com/freedomofpress/securedrop-client","homepage":null,"size":53,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"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":8,"watchers":1,"default_branch":"master"}},"base":{"label":"freedomofpress:storage-layer-part-2","ref":"storage-layer-part-2","sha":"1774ceaf015e83bf056a352cae2d620f5e81ac25","user":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":141504341,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MDQzNDE=","name":"securedrop-client","full_name":"freedomofpress/securedrop-client","owner":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop-client","description":"SecureDrop Qubes client","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop-client","forks_url":"https://api.github.com/repos/freedomofpress/securedrop-client/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop-client/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop-client/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop-client/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop-client/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop-client/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop-client/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop-client/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop-client/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop-client/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop-client/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop-client/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop-client/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop-client/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop-client/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop-client/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop-client/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop-client/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop-client/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop-client/releases{/id}","deployments_url":"https://api.github.com/repos/freedomofpress/securedrop-client/deployments","created_at":"2018-07-19T00:31:37Z","updated_at":"2018-08-18T16:16:24Z","pushed_at":"2018-08-24T01:44:01Z","git_url":"git://github.com/freedomofpress/securedrop-client.git","ssh_url":"git@github.com:freedomofpress/securedrop-client.git","clone_url":"https://github.com/freedomofpress/securedrop-client.git","svn_url":"https://github.com/freedomofpress/securedrop-client","homepage":null,"size":53,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"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":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10"},"html":{"href":"https://github.com/freedomofpress/securedrop-client/pull/10"},"issue":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/10"},"comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/freedomofpress/securedrop-client/statuses/a4bd73b1206a09d5d1c2505816ad3a79c491fb46"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"joshuathayer"}}