payload: {"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppiabot/pulls/comments/307190011","pull_request_review_id":266492432,"id":307190011,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNzE5MDAxMQ==","diff_hunk":"@@ -0,0 +1,40 @@\n+module.exports.checkPullRequestLabels = async function(context) {\n+  var pullRequest = context.payload.pull_request;\n+  var pullRequestNumber = pullRequest.number;\n+\n+  // eslint-disable-next-line no-console\n+  console.log('RUNNING LABEL CHECKS ON PULL REQUEST ' + pullRequestNumber + ' ...');\n+\n+  var labels = pullRequest.labels;\n+  var userName = pullRequest.user.login;\n+  var projectOwnerLabel;\n+  var hasProjectOwnerLabel = labels.some(function(label) {\n+    projectOwnerLabel = label.name;\n+    return projectOwnerLabel.startsWith('PROJECT');\n+  });\n+\n+  // If the PR has a project owner label, assign the project owner\n+  // for the first-pass review of the PR and leave a top-level comment.\n+  if(hasProjectOwnerLabel === true) {\n+    var labelSubstrings = projectOwnerLabel.split('@');\n+    var projectOwner = labelSubstrings[labelSubstrings.length-1].trim();","path":"lib/checkPullRequestLabels.js","position":null,"original_position":20,"commit_id":"05e5d384c312c6a55588a668ea6fef0a96f19702","original_commit_id":"219e8dfd029f6618a2a2817726914ffd2090e48b","user":{"login":"apb7","id":24826041,"node_id":"MDQ6VXNlcjI0ODI2MDQx","avatar_url":"https://avatars2.githubusercontent.com/u/24826041?v=4","gravatar_id":"","url":"https://api.github.com/users/apb7","html_url":"https://github.com/apb7","followers_url":"https://api.github.com/users/apb7/followers","following_url":"https://api.github.com/users/apb7/following{/other_user}","gists_url":"https://api.github.com/users/apb7/gists{/gist_id}","starred_url":"https://api.github.com/users/apb7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apb7/subscriptions","organizations_url":"https://api.github.com/users/apb7/orgs","repos_url":"https://api.github.com/users/apb7/repos","events_url":"https://api.github.com/users/apb7/events{/privacy}","received_events_url":"https://api.github.com/users/apb7/received_events","type":"User","site_admin":false},"body":"Done, thanks!","created_at":"2019-07-25T09:05:13Z","updated_at":"2019-07-25T09:06:19Z","html_url":"https://github.com/oppia/oppiabot/pull/37#discussion_r307190011","pull_request_url":"https://api.github.com/repos/oppia/oppiabot/pulls/37","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/comments/307190011"},"html":{"href":"https://github.com/oppia/oppiabot/pull/37#discussion_r307190011"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/37"}},"in_reply_to_id":307176239},"pull_request":{"url":"https://api.github.com/repos/oppia/oppiabot/pulls/37","id":301031650,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAxMDMxNjUw","html_url":"https://github.com/oppia/oppiabot/pull/37","diff_url":"https://github.com/oppia/oppiabot/pull/37.diff","patch_url":"https://github.com/oppia/oppiabot/pull/37.patch","issue_url":"https://api.github.com/repos/oppia/oppiabot/issues/37","number":37,"state":"open","locked":false,"title":"Fix #34: Assigns the corresponding project owner for the first review of a PR once a project label is added","user":{"login":"apb7","id":24826041,"node_id":"MDQ6VXNlcjI0ODI2MDQx","avatar_url":"https://avatars2.githubusercontent.com/u/24826041?v=4","gravatar_id":"","url":"https://api.github.com/users/apb7","html_url":"https://github.com/apb7","followers_url":"https://api.github.com/users/apb7/followers","following_url":"https://api.github.com/users/apb7/following{/other_user}","gists_url":"https://api.github.com/users/apb7/gists{/gist_id}","starred_url":"https://api.github.com/users/apb7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apb7/subscriptions","organizations_url":"https://api.github.com/users/apb7/orgs","repos_url":"https://api.github.com/users/apb7/repos","events_url":"https://api.github.com/users/apb7/events{/privacy}","received_events_url":"https://api.github.com/users/apb7/received_events","type":"User","site_admin":false},"body":"<!--\r\n  - Thanks for submitting code to Oppiabot! Please fill out the following as part of\r\n  - your pull request so we can review your code more easily.\r\n  -->\r\n\r\n## Explanation\r\n<!--\r\n  - Explain what your PR does. If this PR fixes an existing bug, please include\r\n  - \"Fixes #bugnum:\" in the explanation so that GitHub can auto-close the issue\r\n  - when this PR is merged.\r\n  -->\r\nFixes #34.\r\nPlease note that the project labels need to be modified as discussed (@DubeySandeep is working on it) before this check is deployed.\r\n\r\n## Checklist\r\n- [X] I have successfully deployed my own instance of Oppiabot.\r\n  - You can find instructions for doing this [here](https://github.com/oppia/oppiabot/wiki/Deploying-your-own-instance-of-the-oppiabot).\r\n- [X] I have manually tested all the changes made in this PR following the [manual tests matrix](https://github.com/oppia/oppiabot/wiki/Manual-Tests-Matrix).\r\n","created_at":"2019-07-25T08:16:56Z","updated_at":"2019-07-25T09:06:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71458687d00b6995312bd384178ef3f84f32fbf9","assignee":{"login":"seanlip","id":10575562,"node_id":"MDQ6VXNlcjEwNTc1NTYy","avatar_url":"https://avatars0.githubusercontent.com/u/10575562?v=4","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},"assignees":[{"login":"seanlip","id":10575562,"node_id":"MDQ6VXNlcjEwNTc1NTYy","avatar_url":"https://avatars0.githubusercontent.com/u/10575562?v=4","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}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppiabot/pulls/37/commits","review_comments_url":"https://api.github.com/repos/oppia/oppiabot/pulls/37/comments","review_comment_url":"https://api.github.com/repos/oppia/oppiabot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppiabot/issues/37/comments","statuses_url":"https://api.github.com/repos/oppia/oppiabot/statuses/05e5d384c312c6a55588a668ea6fef0a96f19702","head":{"label":"oppia:label-checks","ref":"label-checks","sha":"05e5d384c312c6a55588a668ea6fef0a96f19702","user":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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":131213171,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMTMxNzE=","name":"oppiabot","full_name":"oppia/oppiabot","private":false,"owner":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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},"html_url":"https://github.com/oppia/oppiabot","description":"Helper bot for the Oppia code repository dev workflow.","fork":false,"url":"https://api.github.com/repos/oppia/oppiabot","forks_url":"https://api.github.com/repos/oppia/oppiabot/forks","keys_url":"https://api.github.com/repos/oppia/oppiabot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppiabot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppiabot/teams","hooks_url":"https://api.github.com/repos/oppia/oppiabot/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppiabot/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppiabot/events","assignees_url":"https://api.github.com/repos/oppia/oppiabot/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppiabot/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppiabot/tags","blobs_url":"https://api.github.com/repos/oppia/oppiabot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppiabot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppiabot/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppiabot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppiabot/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppiabot/languages","stargazers_url":"https://api.github.com/repos/oppia/oppiabot/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppiabot/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppiabot/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppiabot/subscription","commits_url":"https://api.github.com/repos/oppia/oppiabot/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppiabot/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppiabot/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppiabot/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppiabot/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppiabot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppiabot/merges","archive_url":"https://api.github.com/repos/oppia/oppiabot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppiabot/downloads","issues_url":"https://api.github.com/repos/oppia/oppiabot/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppiabot/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppiabot/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppiabot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppiabot/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppiabot/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppiabot/deployments","created_at":"2018-04-26T21:35:02Z","updated_at":"2019-06-21T18:02:23Z","pushed_at":"2019-07-25T09:04:41Z","git_url":"git://github.com/oppia/oppiabot.git","ssh_url":"git@github.com:oppia/oppiabot.git","clone_url":"https://github.com/oppia/oppiabot.git","svn_url":"https://github.com/oppia/oppiabot","homepage":"","size":84,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":10,"watchers":1,"default_branch":"master"}},"base":{"label":"oppia:master","ref":"master","sha":"4f2cd2b1d906f3d58b490ce40a005466ea8ec514","user":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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":131213171,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMTMxNzE=","name":"oppiabot","full_name":"oppia/oppiabot","private":false,"owner":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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},"html_url":"https://github.com/oppia/oppiabot","description":"Helper bot for the Oppia code repository dev workflow.","fork":false,"url":"https://api.github.com/repos/oppia/oppiabot","forks_url":"https://api.github.com/repos/oppia/oppiabot/forks","keys_url":"https://api.github.com/repos/oppia/oppiabot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppiabot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppiabot/teams","hooks_url":"https://api.github.com/repos/oppia/oppiabot/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppiabot/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppiabot/events","assignees_url":"https://api.github.com/repos/oppia/oppiabot/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppiabot/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppiabot/tags","blobs_url":"https://api.github.com/repos/oppia/oppiabot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppiabot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppiabot/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppiabot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppiabot/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppiabot/languages","stargazers_url":"https://api.github.com/repos/oppia/oppiabot/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppiabot/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppiabot/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppiabot/subscription","commits_url":"https://api.github.com/repos/oppia/oppiabot/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppiabot/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppiabot/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppiabot/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppiabot/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppiabot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppiabot/merges","archive_url":"https://api.github.com/repos/oppia/oppiabot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppiabot/downloads","issues_url":"https://api.github.com/repos/oppia/oppiabot/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppiabot/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppiabot/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppiabot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppiabot/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppiabot/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppiabot/deployments","created_at":"2018-04-26T21:35:02Z","updated_at":"2019-06-21T18:02:23Z","pushed_at":"2019-07-25T09:04:41Z","git_url":"git://github.com/oppia/oppiabot.git","ssh_url":"git@github.com:oppia/oppiabot.git","clone_url":"https://github.com/oppia/oppiabot.git","svn_url":"https://github.com/oppia/oppiabot","homepage":"","size":84,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/37"},"html":{"href":"https://github.com/oppia/oppiabot/pull/37"},"issue":{"href":"https://api.github.com/repos/oppia/oppiabot/issues/37"},"comments":{"href":"https://api.github.com/repos/oppia/oppiabot/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppiabot/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppiabot/statuses/05e5d384c312c6a55588a668ea6fef0a96f19702"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"apb7"}}