{"action":"created","comment":{"url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/comments/172040511","pull_request_review_id":100998089,"id":172040511,"diff_hunk":"@@ -0,0 +1,105 @@\n+import logging\n+from user_summary.utility import fetch_data_from_mediawiki_api\n+\n+\n+# Contains data and functions related to the achievements section of WikiCV\n+class AchievementsModule:\n+\n+    logger = logging.getLogger('django')\n+    achievements = []\n+    contribution_threshold = 15\n+\n+    # Starter function for calculating achievements\n+    def calculate_achievements(self, username, user_authorship_mapping):\n+        page_ids = []\n+        message = 'Achievements calculated successfully for user:' \\\n+                  + username + '. Achievements are:'\n+        for key, value in \\\n+                user_authorship_mapping['percentageContribution'].items():\n+            if value >= self.contribution_threshold:\n+                page_ids.append(key)\n+        pageids_list = ' | '.join(str(page) for page in page_ids)","path":"src/user_summary/modules/achievements_module.py","position":null,"original_position":21,"commit_id":"3dc0683b540b407586773608d6f4a7c7587c492e","original_commit_id":"ab8d1844a640667e26a955906ace1e6ebd757425","user":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2018-03-04T08:11:24Z","updated_at":"2018-03-04T08:11:24Z","html_url":"https://github.com/MeghaSharma21/WikiCV/pull/2#discussion_r172040511","pull_request_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/comments/172040511"},"html":{"href":"https://github.com/MeghaSharma21/WikiCV/pull/2#discussion_r172040511"},"pull_request":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2"}},"in_reply_to_id":168635019},"pull_request":{"url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2","id":168198722,"html_url":"https://github.com/MeghaSharma21/WikiCV/pull/2","diff_url":"https://github.com/MeghaSharma21/WikiCV/pull/2.diff","patch_url":"https://github.com/MeghaSharma21/WikiCV/pull/2.patch","issue_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/2","number":2,"state":"open","locked":false,"title":"PR for Achievements module","user":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"body":"@tgr @slaporte, kindly review the code for achievements module.\r\nI've sorted the achievements by contribution of user in different pages.","created_at":"2018-02-09T10:07:44Z","updated_at":"2018-03-04T08:11:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df20bdb97e06f4dc34660432c7dcda11db06beb2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2/commits","review_comments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2/comments","review_comment_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/2/comments","statuses_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/statuses/3dc0683b540b407586773608d6f4a7c7587c492e","head":{"label":"MeghaSharma21:dev","ref":"dev","sha":"3dc0683b540b407586773608d6f4a7c7587c492e","user":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"repo":{"id":116348483,"name":"WikiCV","full_name":"MeghaSharma21/WikiCV","owner":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MeghaSharma21/WikiCV","description":null,"fork":false,"url":"https://api.github.com/repos/MeghaSharma21/WikiCV","forks_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/forks","keys_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/teams","hooks_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/hooks","issue_events_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/events{/number}","events_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/events","assignees_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/assignees{/user}","branches_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/branches{/branch}","tags_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/tags","blobs_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/refs{/sha}","trees_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/statuses/{sha}","languages_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/languages","stargazers_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/stargazers","contributors_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/contributors","subscribers_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/subscribers","subscription_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/subscription","commits_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/commits{/sha}","git_commits_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/commits{/sha}","comments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/comments{/number}","issue_comment_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/comments{/number}","contents_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/contents/{+path}","compare_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/merges","archive_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/downloads","issues_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues{/number}","pulls_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls{/number}","milestones_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/milestones{/number}","notifications_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/labels{/name}","releases_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/releases{/id}","deployments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/deployments","created_at":"2018-01-05T06:04:09Z","updated_at":"2018-02-09T09:25:43Z","pushed_at":"2018-02-18T16:35:21Z","git_url":"git://github.com/MeghaSharma21/WikiCV.git","ssh_url":"git@github.com:MeghaSharma21/WikiCV.git","clone_url":"https://github.com/MeghaSharma21/WikiCV.git","svn_url":"https://github.com/MeghaSharma21/WikiCV","homepage":null,"size":48,"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":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MeghaSharma21:master","ref":"master","sha":"9d11fc6b59934201420631a256a1ebfcdfd9b40d","user":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"repo":{"id":116348483,"name":"WikiCV","full_name":"MeghaSharma21/WikiCV","owner":{"login":"MeghaSharma21","id":24650465,"avatar_url":"https://avatars3.githubusercontent.com/u/24650465?v=4","gravatar_id":"","url":"https://api.github.com/users/MeghaSharma21","html_url":"https://github.com/MeghaSharma21","followers_url":"https://api.github.com/users/MeghaSharma21/followers","following_url":"https://api.github.com/users/MeghaSharma21/following{/other_user}","gists_url":"https://api.github.com/users/MeghaSharma21/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghaSharma21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghaSharma21/subscriptions","organizations_url":"https://api.github.com/users/MeghaSharma21/orgs","repos_url":"https://api.github.com/users/MeghaSharma21/repos","events_url":"https://api.github.com/users/MeghaSharma21/events{/privacy}","received_events_url":"https://api.github.com/users/MeghaSharma21/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MeghaSharma21/WikiCV","description":null,"fork":false,"url":"https://api.github.com/repos/MeghaSharma21/WikiCV","forks_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/forks","keys_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/teams","hooks_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/hooks","issue_events_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/events{/number}","events_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/events","assignees_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/assignees{/user}","branches_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/branches{/branch}","tags_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/tags","blobs_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/refs{/sha}","trees_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/statuses/{sha}","languages_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/languages","stargazers_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/stargazers","contributors_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/contributors","subscribers_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/subscribers","subscription_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/subscription","commits_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/commits{/sha}","git_commits_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/git/commits{/sha}","comments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/comments{/number}","issue_comment_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/comments{/number}","contents_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/contents/{+path}","compare_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/merges","archive_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/downloads","issues_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues{/number}","pulls_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls{/number}","milestones_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/milestones{/number}","notifications_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/labels{/name}","releases_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/releases{/id}","deployments_url":"https://api.github.com/repos/MeghaSharma21/WikiCV/deployments","created_at":"2018-01-05T06:04:09Z","updated_at":"2018-02-09T09:25:43Z","pushed_at":"2018-02-18T16:35:21Z","git_url":"git://github.com/MeghaSharma21/WikiCV.git","ssh_url":"git@github.com:MeghaSharma21/WikiCV.git","clone_url":"https://github.com/MeghaSharma21/WikiCV.git","svn_url":"https://github.com/MeghaSharma21/WikiCV","homepage":null,"size":48,"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":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2"},"html":{"href":"https://github.com/MeghaSharma21/WikiCV/pull/2"},"issue":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/2"},"comments":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/MeghaSharma21/WikiCV/statuses/3dc0683b540b407586773608d6f4a7c7587c492e"}},"author_association":"OWNER"}}
{"actor":{"display_login":"MeghaSharma21"}}