{"action":"created","comment":{"url":"https://api.github.com/repos/Ericsson/codechecker/pulls/comments/214732800","pull_request_review_id":151847837,"id":214732800,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDczMjgwMA==","diff_hunk":"@@ -60,3 +62,56 @@ def remove_unused_files(session):\n         .delete(synchronize_session=False)\n \n     LOG.info(\"Garbage collection of dangling files finished.\")\n+\n+\n+def upgrade_severity_levels(session, severity_map):\n+    \"\"\"\n+    Updates the potentially changed severities at the reports.\n+    \"\"\"\n+    LOG.info(\"Upgrading severity levels started...\")\n+\n+    # Create a sql query from the severity map.\n+    severity_map_q = union_all(*[\n+        select([bindparam('checker_id' + str(i), checker_id)\n+                .label('checker_id'),\n+                bindparam('severity' + str(i),\n+                          Severity._NAMES_TO_VALUES[severity_map[checker_id]])\n+                .label('severity')])\n+        for i, checker_id in enumerate(severity_map)]) \\\n+        .alias('new_severities')\n+\n+    checker_ids = severity_map.keys()\n+\n+    # Get checkers which has been changed.\n+    changed_checker_q = select([Report.checker_id, Report.severity]) \\\n+        .group_by(Report.checker_id, Report.severity) \\\n+        .where(Report.checker_id.in_(checker_ids)) \\\n+        .except_(session.query(severity_map_q)).alias('changed_severites')\n+\n+    changed_checkers = session.query(changed_checker_q.c.checker_id,\n+                                     changed_checker_q.c.severity)\n+\n+    # Update severity levels of checkers.\n+    if changed_checkers:\n+        updated_checker_ids = set()\n+        for checker_id, severity_old in changed_checkers:\n+            severity_new = severity_map.get(checker_id, 'UNSPECIFIED')\n+            severity_id = Severity._NAMES_TO_VALUES[severity_new]\n+\n+            LOG.info(\"Upgrading severity level of %s from %s to %s\",\n+                     checker_id,\n+                     Severity._VALUES_TO_NAMES[severity_old],","path":"libcodechecker/server/database/db_cleanup.py","position":51,"original_position":51,"commit_id":"a102094971805cebaa8e5d26d44a381b760e01f0","original_commit_id":"a102094971805cebaa8e5d26d44a381b760e01f0","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Access to a protected member _VALUES_TO_NAMES of a client class](https://app.codacy.com/app/gyorb/codechecker/pullRequest?prid=1976476)","created_at":"2018-09-03T16:31:40Z","updated_at":"2018-09-03T16:31:40Z","html_url":"https://github.com/Ericsson/codechecker/pull/1691#discussion_r214732800","pull_request_url":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/comments/214732800"},"html":{"href":"https://github.com/Ericsson/codechecker/pull/1691#discussion_r214732800"},"pull_request":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691"}}},"pull_request":{"url":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691","id":205130359,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MTMwMzU5","html_url":"https://github.com/Ericsson/codechecker/pull/1691","diff_url":"https://github.com/Ericsson/codechecker/pull/1691.diff","patch_url":"https://github.com/Ericsson/codechecker/pull/1691.patch","issue_url":"https://api.github.com/repos/Ericsson/codechecker/issues/1691","number":1691,"state":"open","locked":false,"title":"Common severity for a checker","user":{"login":"csordasmarton","id":6695818,"node_id":"MDQ6VXNlcjY2OTU4MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6695818?v=4","gravatar_id":"","url":"https://api.github.com/users/csordasmarton","html_url":"https://github.com/csordasmarton","followers_url":"https://api.github.com/users/csordasmarton/followers","following_url":"https://api.github.com/users/csordasmarton/following{/other_user}","gists_url":"https://api.github.com/users/csordasmarton/gists{/gist_id}","starred_url":"https://api.github.com/users/csordasmarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csordasmarton/subscriptions","organizations_url":"https://api.github.com/users/csordasmarton/orgs","repos_url":"https://api.github.com/users/csordasmarton/repos","events_url":"https://api.github.com/users/csordasmarton/events{/privacy}","received_events_url":"https://api.github.com/users/csordasmarton/received_events","type":"User","site_admin":false},"body":"Closes #1075","created_at":"2018-07-31T14:22:24Z","updated_at":"2018-09-03T16:31:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a151ea966d6a8b34bec26a39789372bb1f0d3f5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gyorb","id":10214062,"node_id":"MDQ6VXNlcjEwMjE0MDYy","avatar_url":"https://avatars2.githubusercontent.com/u/10214062?v=4","gravatar_id":"","url":"https://api.github.com/users/gyorb","html_url":"https://github.com/gyorb","followers_url":"https://api.github.com/users/gyorb/followers","following_url":"https://api.github.com/users/gyorb/following{/other_user}","gists_url":"https://api.github.com/users/gyorb/gists{/gist_id}","starred_url":"https://api.github.com/users/gyorb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyorb/subscriptions","organizations_url":"https://api.github.com/users/gyorb/orgs","repos_url":"https://api.github.com/users/gyorb/repos","events_url":"https://api.github.com/users/gyorb/events{/privacy}","received_events_url":"https://api.github.com/users/gyorb/received_events","type":"User","site_admin":false},{"login":"bruntib","id":12861163,"node_id":"MDQ6VXNlcjEyODYxMTYz","avatar_url":"https://avatars3.githubusercontent.com/u/12861163?v=4","gravatar_id":"","url":"https://api.github.com/users/bruntib","html_url":"https://github.com/bruntib","followers_url":"https://api.github.com/users/bruntib/followers","following_url":"https://api.github.com/users/bruntib/following{/other_user}","gists_url":"https://api.github.com/users/bruntib/gists{/gist_id}","starred_url":"https://api.github.com/users/bruntib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruntib/subscriptions","organizations_url":"https://api.github.com/users/bruntib/orgs","repos_url":"https://api.github.com/users/bruntib/repos","events_url":"https://api.github.com/users/bruntib/events{/privacy}","received_events_url":"https://api.github.com/users/bruntib/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":224632309,"node_id":"MDU6TGFiZWwyMjQ2MzIzMDk=","url":"https://api.github.com/repos/Ericsson/codechecker/labels/Kind:%20Enhancement","name":"Kind: Enhancement","color":"84b6eb","default":false},{"id":670091633,"node_id":"MDU6TGFiZWw2NzAwOTE2MzM=","url":"https://api.github.com/repos/Ericsson/codechecker/labels/Target:%20Server","name":"Target: Server","color":"007ea7","default":false},{"id":541824503,"node_id":"MDU6TGFiZWw1NDE4MjQ1MDM=","url":"https://api.github.com/repos/Ericsson/codechecker/labels/Target:%20Test","name":"Target: Test","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691/commits","review_comments_url":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691/comments","review_comment_url":"https://api.github.com/repos/Ericsson/codechecker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ericsson/codechecker/issues/1691/comments","statuses_url":"https://api.github.com/repos/Ericsson/codechecker/statuses/a102094971805cebaa8e5d26d44a381b760e01f0","head":{"label":"csordasmarton:common-severity-levels","ref":"common-severity-levels","sha":"a102094971805cebaa8e5d26d44a381b760e01f0","user":{"login":"csordasmarton","id":6695818,"node_id":"MDQ6VXNlcjY2OTU4MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6695818?v=4","gravatar_id":"","url":"https://api.github.com/users/csordasmarton","html_url":"https://github.com/csordasmarton","followers_url":"https://api.github.com/users/csordasmarton/followers","following_url":"https://api.github.com/users/csordasmarton/following{/other_user}","gists_url":"https://api.github.com/users/csordasmarton/gists{/gist_id}","starred_url":"https://api.github.com/users/csordasmarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csordasmarton/subscriptions","organizations_url":"https://api.github.com/users/csordasmarton/orgs","repos_url":"https://api.github.com/users/csordasmarton/repos","events_url":"https://api.github.com/users/csordasmarton/events{/privacy}","received_events_url":"https://api.github.com/users/csordasmarton/received_events","type":"User","site_admin":false},"repo":{"id":96524409,"node_id":"MDEwOlJlcG9zaXRvcnk5NjUyNDQwOQ==","name":"codechecker","full_name":"csordasmarton/codechecker","owner":{"login":"csordasmarton","id":6695818,"node_id":"MDQ6VXNlcjY2OTU4MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6695818?v=4","gravatar_id":"","url":"https://api.github.com/users/csordasmarton","html_url":"https://github.com/csordasmarton","followers_url":"https://api.github.com/users/csordasmarton/followers","following_url":"https://api.github.com/users/csordasmarton/following{/other_user}","gists_url":"https://api.github.com/users/csordasmarton/gists{/gist_id}","starred_url":"https://api.github.com/users/csordasmarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csordasmarton/subscriptions","organizations_url":"https://api.github.com/users/csordasmarton/orgs","repos_url":"https://api.github.com/users/csordasmarton/repos","events_url":"https://api.github.com/users/csordasmarton/events{/privacy}","received_events_url":"https://api.github.com/users/csordasmarton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/csordasmarton/codechecker","description":"CodeChecker is a defect database and viewer extension for the Clang Static Analyzer and Clang Tidy","fork":true,"url":"https://api.github.com/repos/csordasmarton/codechecker","forks_url":"https://api.github.com/repos/csordasmarton/codechecker/forks","keys_url":"https://api.github.com/repos/csordasmarton/codechecker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csordasmarton/codechecker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csordasmarton/codechecker/teams","hooks_url":"https://api.github.com/repos/csordasmarton/codechecker/hooks","issue_events_url":"https://api.github.com/repos/csordasmarton/codechecker/issues/events{/number}","events_url":"https://api.github.com/repos/csordasmarton/codechecker/events","assignees_url":"https://api.github.com/repos/csordasmarton/codechecker/assignees{/user}","branches_url":"https://api.github.com/repos/csordasmarton/codechecker/branches{/branch}","tags_url":"https://api.github.com/repos/csordasmarton/codechecker/tags","blobs_url":"https://api.github.com/repos/csordasmarton/codechecker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csordasmarton/codechecker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csordasmarton/codechecker/git/refs{/sha}","trees_url":"https://api.github.com/repos/csordasmarton/codechecker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csordasmarton/codechecker/statuses/{sha}","languages_url":"https://api.github.com/repos/csordasmarton/codechecker/languages","stargazers_url":"https://api.github.com/repos/csordasmarton/codechecker/stargazers","contributors_url":"https://api.github.com/repos/csordasmarton/codechecker/contributors","subscribers_url":"https://api.github.com/repos/csordasmarton/codechecker/subscribers","subscription_url":"https://api.github.com/repos/csordasmarton/codechecker/subscription","commits_url":"https://api.github.com/repos/csordasmarton/codechecker/commits{/sha}","git_commits_url":"https://api.github.com/repos/csordasmarton/codechecker/git/commits{/sha}","comments_url":"https://api.github.com/repos/csordasmarton/codechecker/comments{/number}","issue_comment_url":"https://api.github.com/repos/csordasmarton/codechecker/issues/comments{/number}","contents_url":"https://api.github.com/repos/csordasmarton/codechecker/contents/{+path}","compare_url":"https://api.github.com/repos/csordasmarton/codechecker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csordasmarton/codechecker/merges","archive_url":"https://api.github.com/repos/csordasmarton/codechecker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csordasmarton/codechecker/downloads","issues_url":"https://api.github.com/repos/csordasmarton/codechecker/issues{/number}","pulls_url":"https://api.github.com/repos/csordasmarton/codechecker/pulls{/number}","milestones_url":"https://api.github.com/repos/csordasmarton/codechecker/milestones{/number}","notifications_url":"https://api.github.com/repos/csordasmarton/codechecker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csordasmarton/codechecker/labels{/name}","releases_url":"https://api.github.com/repos/csordasmarton/codechecker/releases{/id}","deployments_url":"https://api.github.com/repos/csordasmarton/codechecker/deployments","created_at":"2017-07-07T09:45:19Z","updated_at":"2018-08-08T07:25:00Z","pushed_at":"2018-09-03T14:13:42Z","git_url":"git://github.com/csordasmarton/codechecker.git","ssh_url":"git@github.com:csordasmarton/codechecker.git","clone_url":"https://github.com/csordasmarton/codechecker.git","svn_url":"https://github.com/csordasmarton/codechecker","homepage":"","size":14922,"stargazers_count":1,"watchers_count":1,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Ericsson:master","ref":"master","sha":"1ae19a42c7e73052eb91d6bb5366a0ec8517a68d","user":{"login":"Ericsson","id":4161311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEzMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4161311?v=4","gravatar_id":"","url":"https://api.github.com/users/Ericsson","html_url":"https://github.com/Ericsson","followers_url":"https://api.github.com/users/Ericsson/followers","following_url":"https://api.github.com/users/Ericsson/following{/other_user}","gists_url":"https://api.github.com/users/Ericsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericsson/subscriptions","organizations_url":"https://api.github.com/users/Ericsson/orgs","repos_url":"https://api.github.com/users/Ericsson/repos","events_url":"https://api.github.com/users/Ericsson/events{/privacy}","received_events_url":"https://api.github.com/users/Ericsson/received_events","type":"Organization","site_admin":false},"repo":{"id":37459110,"node_id":"MDEwOlJlcG9zaXRvcnkzNzQ1OTExMA==","name":"codechecker","full_name":"Ericsson/codechecker","owner":{"login":"Ericsson","id":4161311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEzMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4161311?v=4","gravatar_id":"","url":"https://api.github.com/users/Ericsson","html_url":"https://github.com/Ericsson","followers_url":"https://api.github.com/users/Ericsson/followers","following_url":"https://api.github.com/users/Ericsson/following{/other_user}","gists_url":"https://api.github.com/users/Ericsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericsson/subscriptions","organizations_url":"https://api.github.com/users/Ericsson/orgs","repos_url":"https://api.github.com/users/Ericsson/repos","events_url":"https://api.github.com/users/Ericsson/events{/privacy}","received_events_url":"https://api.github.com/users/Ericsson/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ericsson/codechecker","description":"CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy","fork":false,"url":"https://api.github.com/repos/Ericsson/codechecker","forks_url":"https://api.github.com/repos/Ericsson/codechecker/forks","keys_url":"https://api.github.com/repos/Ericsson/codechecker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ericsson/codechecker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ericsson/codechecker/teams","hooks_url":"https://api.github.com/repos/Ericsson/codechecker/hooks","issue_events_url":"https://api.github.com/repos/Ericsson/codechecker/issues/events{/number}","events_url":"https://api.github.com/repos/Ericsson/codechecker/events","assignees_url":"https://api.github.com/repos/Ericsson/codechecker/assignees{/user}","branches_url":"https://api.github.com/repos/Ericsson/codechecker/branches{/branch}","tags_url":"https://api.github.com/repos/Ericsson/codechecker/tags","blobs_url":"https://api.github.com/repos/Ericsson/codechecker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ericsson/codechecker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ericsson/codechecker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ericsson/codechecker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ericsson/codechecker/statuses/{sha}","languages_url":"https://api.github.com/repos/Ericsson/codechecker/languages","stargazers_url":"https://api.github.com/repos/Ericsson/codechecker/stargazers","contributors_url":"https://api.github.com/repos/Ericsson/codechecker/contributors","subscribers_url":"https://api.github.com/repos/Ericsson/codechecker/subscribers","subscription_url":"https://api.github.com/repos/Ericsson/codechecker/subscription","commits_url":"https://api.github.com/repos/Ericsson/codechecker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ericsson/codechecker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ericsson/codechecker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ericsson/codechecker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ericsson/codechecker/contents/{+path}","compare_url":"https://api.github.com/repos/Ericsson/codechecker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ericsson/codechecker/merges","archive_url":"https://api.github.com/repos/Ericsson/codechecker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ericsson/codechecker/downloads","issues_url":"https://api.github.com/repos/Ericsson/codechecker/issues{/number}","pulls_url":"https://api.github.com/repos/Ericsson/codechecker/pulls{/number}","milestones_url":"https://api.github.com/repos/Ericsson/codechecker/milestones{/number}","notifications_url":"https://api.github.com/repos/Ericsson/codechecker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ericsson/codechecker/labels{/name}","releases_url":"https://api.github.com/repos/Ericsson/codechecker/releases{/id}","deployments_url":"https://api.github.com/repos/Ericsson/codechecker/deployments","created_at":"2015-06-15T10:38:51Z","updated_at":"2018-09-03T13:02:25Z","pushed_at":"2018-09-03T15:05:04Z","git_url":"git://github.com/Ericsson/codechecker.git","ssh_url":"git@github.com:Ericsson/codechecker.git","clone_url":"https://github.com/Ericsson/codechecker.git","svn_url":"https://github.com/Ericsson/codechecker","homepage":"","size":14687,"stargazers_count":474,"watchers_count":474,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":160,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":61,"open_issues":160,"watchers":474,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691"},"html":{"href":"https://github.com/Ericsson/codechecker/pull/1691"},"issue":{"href":"https://api.github.com/repos/Ericsson/codechecker/issues/1691"},"comments":{"href":"https://api.github.com/repos/Ericsson/codechecker/issues/1691/comments"},"review_comments":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691/comments"},"review_comment":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ericsson/codechecker/pulls/1691/commits"},"statuses":{"href":"https://api.github.com/repos/Ericsson/codechecker/statuses/a102094971805cebaa8e5d26d44a381b760e01f0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}