{"action":"created","comment":{"url":"https://api.github.com/repos/measurement-factory/anubis/pulls/comments/199333483","pull_request_review_id":133422867,"id":199333483,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTMzMzQ4Mw==","diff_hunk":"@@ -54,17 +56,21 @@ class PrMerger {\n     // there is a PR still-in-merge.\n     async runStep() {\n         Logger.info(\"runStep running\");\n-        const finalizer = await this._current();\n-        const prList = await this._getPRList(finalizer);\n+        const stagingPr = await this._current();\n+        const prList = await this._preparePRList(stagingPr);\n \n         this.total = 0;\n+        let merging = false;\n         while (prList.length) {\n             try {\n-                const pr = prList.shift();\n+                const rawPr = prList.shift();\n                 this.total++;\n-                const result = await pr.anubisProcessor.process();\n-                if (!this.prDone(pr.anubisProcessor, result))\n-                    return true;\n+                let pr = new PullRequest(rawPr);\n+                const result = await pr.process(merging);\n+                if (!merging)\n+                    merging = result.succeeded();","path":"src/PrMerger.js","position":null,"original_position":82,"commit_id":"b853ec7e25a0e1fed20bfe14c6926a2eff007b79","original_commit_id":"5d1c03cc7fed1978bec8cc5a7f1c277804d7ef3d","user":{"login":"eduard-bagdasaryan","id":13069213,"node_id":"MDQ6VXNlcjEzMDY5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/13069213?v=4","gravatar_id":"","url":"https://api.github.com/users/eduard-bagdasaryan","html_url":"https://github.com/eduard-bagdasaryan","followers_url":"https://api.github.com/users/eduard-bagdasaryan/followers","following_url":"https://api.github.com/users/eduard-bagdasaryan/following{/other_user}","gists_url":"https://api.github.com/users/eduard-bagdasaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-bagdasaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-bagdasaryan/subscriptions","organizations_url":"https://api.github.com/users/eduard-bagdasaryan/orgs","repos_url":"https://api.github.com/users/eduard-bagdasaryan/repos","events_url":"https://api.github.com/users/eduard-bagdasaryan/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-bagdasaryan/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2018-06-30T22:03:33Z","updated_at":"2018-06-30T22:18:35Z","html_url":"https://github.com/measurement-factory/anubis/pull/25#discussion_r199333483","pull_request_url":"https://api.github.com/repos/measurement-factory/anubis/pulls/25","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/comments/199333483"},"html":{"href":"https://github.com/measurement-factory/anubis/pull/25#discussion_r199333483"},"pull_request":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/25"}},"in_reply_to_id":199034683},"pull_request":{"url":"https://api.github.com/repos/measurement-factory/anubis/pulls/25","id":193964836,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzOTY0ODM2","html_url":"https://github.com/measurement-factory/anubis/pull/25","diff_url":"https://github.com/measurement-factory/anubis/pull/25.diff","patch_url":"https://github.com/measurement-factory/anubis/pull/25.patch","issue_url":"https://api.github.com/repos/measurement-factory/anubis/issues/25","number":25,"state":"open","locked":false,"title":"Keep PR GitHub metadata up-to-date","user":{"login":"eduard-bagdasaryan","id":13069213,"node_id":"MDQ6VXNlcjEzMDY5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/13069213?v=4","gravatar_id":"","url":"https://api.github.com/users/eduard-bagdasaryan","html_url":"https://github.com/eduard-bagdasaryan","followers_url":"https://api.github.com/users/eduard-bagdasaryan/followers","following_url":"https://api.github.com/users/eduard-bagdasaryan/following{/other_user}","gists_url":"https://api.github.com/users/eduard-bagdasaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-bagdasaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-bagdasaryan/subscriptions","organizations_url":"https://api.github.com/users/eduard-bagdasaryan/orgs","repos_url":"https://api.github.com/users/eduard-bagdasaryan/repos","events_url":"https://api.github.com/users/eduard-bagdasaryan/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-bagdasaryan/received_events","type":"User","site_admin":false},"body":"With this change, before selecting a PR for processing, the bot updates\r\nPR metadata (such as labels, approvals, etc.) for every PR, except the\r\ncurrent one (left as TODO). For this purpose, MergeContext module\r\nwas further refactored, introducing a new PrUpdater class.","created_at":"2018-06-11T12:25:59Z","updated_at":"2018-06-30T22:18:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ff51ec52cec7d3240dfbeabbf5b4d32c9b73fe3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/measurement-factory/anubis/pulls/25/commits","review_comments_url":"https://api.github.com/repos/measurement-factory/anubis/pulls/25/comments","review_comment_url":"https://api.github.com/repos/measurement-factory/anubis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/measurement-factory/anubis/issues/25/comments","statuses_url":"https://api.github.com/repos/measurement-factory/anubis/statuses/b853ec7e25a0e1fed20bfe14c6926a2eff007b79","head":{"label":"measurement-factory:SQUID-330-merge-context-refactoring2","ref":"SQUID-330-merge-context-refactoring2","sha":"b853ec7e25a0e1fed20bfe14c6926a2eff007b79","user":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":122551941,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI1NTE5NDE=","name":"anubis","full_name":"measurement-factory/anubis","owner":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/anubis","description":"A bot that merges GitHub pull requests","fork":false,"url":"https://api.github.com/repos/measurement-factory/anubis","forks_url":"https://api.github.com/repos/measurement-factory/anubis/forks","keys_url":"https://api.github.com/repos/measurement-factory/anubis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/anubis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/anubis/teams","hooks_url":"https://api.github.com/repos/measurement-factory/anubis/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/anubis/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/anubis/events","assignees_url":"https://api.github.com/repos/measurement-factory/anubis/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/anubis/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/anubis/tags","blobs_url":"https://api.github.com/repos/measurement-factory/anubis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/anubis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/anubis/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/anubis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/anubis/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/anubis/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/anubis/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/anubis/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/anubis/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/anubis/subscription","commits_url":"https://api.github.com/repos/measurement-factory/anubis/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/anubis/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/anubis/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/anubis/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/anubis/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/anubis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/anubis/merges","archive_url":"https://api.github.com/repos/measurement-factory/anubis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/anubis/downloads","issues_url":"https://api.github.com/repos/measurement-factory/anubis/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/anubis/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/anubis/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/anubis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/anubis/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/anubis/releases{/id}","deployments_url":"https://api.github.com/repos/measurement-factory/anubis/deployments","created_at":"2018-02-23T00:22:13Z","updated_at":"2018-06-07T13:27:36Z","pushed_at":"2018-06-30T22:16:43Z","git_url":"git://github.com/measurement-factory/anubis.git","ssh_url":"git@github.com:measurement-factory/anubis.git","clone_url":"https://github.com/measurement-factory/anubis.git","svn_url":"https://github.com/measurement-factory/anubis","homepage":null,"size":193,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"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":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"measurement-factory:master","ref":"master","sha":"935f52914e53b0896d80230788fd133187f47fe8","user":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":122551941,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI1NTE5NDE=","name":"anubis","full_name":"measurement-factory/anubis","owner":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/anubis","description":"A bot that merges GitHub pull requests","fork":false,"url":"https://api.github.com/repos/measurement-factory/anubis","forks_url":"https://api.github.com/repos/measurement-factory/anubis/forks","keys_url":"https://api.github.com/repos/measurement-factory/anubis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/anubis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/anubis/teams","hooks_url":"https://api.github.com/repos/measurement-factory/anubis/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/anubis/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/anubis/events","assignees_url":"https://api.github.com/repos/measurement-factory/anubis/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/anubis/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/anubis/tags","blobs_url":"https://api.github.com/repos/measurement-factory/anubis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/anubis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/anubis/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/anubis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/anubis/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/anubis/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/anubis/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/anubis/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/anubis/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/anubis/subscription","commits_url":"https://api.github.com/repos/measurement-factory/anubis/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/anubis/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/anubis/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/anubis/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/anubis/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/anubis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/anubis/merges","archive_url":"https://api.github.com/repos/measurement-factory/anubis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/anubis/downloads","issues_url":"https://api.github.com/repos/measurement-factory/anubis/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/anubis/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/anubis/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/anubis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/anubis/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/anubis/releases{/id}","deployments_url":"https://api.github.com/repos/measurement-factory/anubis/deployments","created_at":"2018-02-23T00:22:13Z","updated_at":"2018-06-07T13:27:36Z","pushed_at":"2018-06-30T22:16:43Z","git_url":"git://github.com/measurement-factory/anubis.git","ssh_url":"git@github.com:measurement-factory/anubis.git","clone_url":"https://github.com/measurement-factory/anubis.git","svn_url":"https://github.com/measurement-factory/anubis","homepage":null,"size":193,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"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":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/25"},"html":{"href":"https://github.com/measurement-factory/anubis/pull/25"},"issue":{"href":"https://api.github.com/repos/measurement-factory/anubis/issues/25"},"comments":{"href":"https://api.github.com/repos/measurement-factory/anubis/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/measurement-factory/anubis/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/measurement-factory/anubis/statuses/b853ec7e25a0e1fed20bfe14c6926a2eff007b79"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eduard-bagdasaryan"}}