{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/45915344","id":45915344,"diff_hunk":"@@ -644,6 +648,17 @@ def _publish_activity(committer_id, activity_id, activity_type):\n         committer_id, activity_id, activity_type, ACTIVITY_STATUS_PUBLIC,\n         '%s published.' % activity_type)\n \n+    # Add contribution dates to the owners and editors. This assumes that the\n+    # only people who could possibly make commits to the exploration are those\n+    # listed explicitly as owners/editors of the exploration.\n+    activity_rights = _get_activity_rights(activity_type, activity_id)\n+    for owner_id in activity_rights.owner_ids:\n+        user_services.update_first_contribution_msec_if_not_set(\n+            owner_id, utils.get_current_time_in_millisecs())\n+    for editor_id in activity_rights.editor_ids:","path":"core/domain/rights_manager.py","position":52,"original_position":52,"commit_id":"038cdac651ef4c1c316a7f4738991e6729b8003b","original_commit_id":"038cdac651ef4c1c316a7f4738991e6729b8003b","user":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"body":"Actually, figured out to use exp_services.get_exploration_snapshots_metadata. Sorry for the spam!","created_at":"2015-11-25T20:24:20Z","updated_at":"2015-11-25T20:24:20Z","html_url":"https://github.com/oppia/oppia/pull/1142#discussion_r45915344","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1142","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/45915344"},"html":{"href":"https://github.com/oppia/oppia/pull/1142#discussion_r45915344"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1142"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1142","id":50894030,"html_url":"https://github.com/oppia/oppia/pull/1142","diff_url":"https://github.com/oppia/oppia/pull/1142.diff","patch_url":"https://github.com/oppia/oppia/pull/1142.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1142","number":1142,"state":"open","locked":false,"title":"Added code that updates first contribution datetime when an user publ…","user":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"body":"…ishes an exploration or updates a published exploration. If the first contribution datetime was already set before, the datetime remains unchanged.","created_at":"2015-11-17T01:47:30Z","updated_at":"2015-11-25T20:24:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11c86776b122795a9c79136c124c59d90b89b509","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1142/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1142/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1142/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/038cdac651ef4c1c316a7f4738991e6729b8003b","head":{"label":"kerryxwang:contribution-date-update","ref":"contribution-date-update","sha":"038cdac651ef4c1c316a7f4738991e6729b8003b","user":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"repo":{"id":43977306,"name":"oppia","full_name":"kerryxwang/oppia","owner":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kerryxwang/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/kerryxwang/oppia","forks_url":"https://api.github.com/repos/kerryxwang/oppia/forks","keys_url":"https://api.github.com/repos/kerryxwang/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kerryxwang/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kerryxwang/oppia/teams","hooks_url":"https://api.github.com/repos/kerryxwang/oppia/hooks","issue_events_url":"https://api.github.com/repos/kerryxwang/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/kerryxwang/oppia/events","assignees_url":"https://api.github.com/repos/kerryxwang/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/kerryxwang/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/kerryxwang/oppia/tags","blobs_url":"https://api.github.com/repos/kerryxwang/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kerryxwang/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kerryxwang/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/kerryxwang/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kerryxwang/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/kerryxwang/oppia/languages","stargazers_url":"https://api.github.com/repos/kerryxwang/oppia/stargazers","contributors_url":"https://api.github.com/repos/kerryxwang/oppia/contributors","subscribers_url":"https://api.github.com/repos/kerryxwang/oppia/subscribers","subscription_url":"https://api.github.com/repos/kerryxwang/oppia/subscription","commits_url":"https://api.github.com/repos/kerryxwang/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/kerryxwang/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/kerryxwang/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/kerryxwang/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/kerryxwang/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/kerryxwang/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kerryxwang/oppia/merges","archive_url":"https://api.github.com/repos/kerryxwang/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kerryxwang/oppia/downloads","issues_url":"https://api.github.com/repos/kerryxwang/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/kerryxwang/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/kerryxwang/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/kerryxwang/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kerryxwang/oppia/labels{/name}","releases_url":"https://api.github.com/repos/kerryxwang/oppia/releases{/id}","created_at":"2015-10-09T19:59:29Z","updated_at":"2015-10-09T19:59:35Z","pushed_at":"2015-11-24T10:35:17Z","git_url":"git://github.com/kerryxwang/oppia.git","ssh_url":"git@github.com:kerryxwang/oppia.git","clone_url":"https://github.com/kerryxwang/oppia.git","svn_url":"https://github.com/kerryxwang/oppia","homepage":"https://www.oppia.org","size":38417,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"6bf21b276749b28dc502019ab6c3f4248795f518","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","created_at":"2015-08-14T00:16:14Z","updated_at":"2015-11-22T21:46:00Z","pushed_at":"2015-11-25T17:58:13Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":43614,"stargazers_count":58,"watchers_count":58,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":224,"forks":74,"open_issues":224,"watchers":58,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1142"},"html":{"href":"https://github.com/oppia/oppia/pull/1142"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1142"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1142/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1142/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1142/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/038cdac651ef4c1c316a7f4738991e6729b8003b"}}}}