{"action":"created","comment":{"url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/comments/186442813","pull_request_review_id":118020335,"id":186442813,"diff_hunk":"@@ -167,6 +177,44 @@ plugin = (robot) ->\n \n   start_violations_polling(robot)\n \n+  getCfgovDeploys = (deployEnv, parentResolve, page = 1, deploys) ->\n+    deploys ?= _.fromPairs(\n+      _.zip deployEnv.targets, _.map(deployEnv.targets, (e) -> null)\n+    )\n+\n+    maxPagesToRequest = 6","path":"src/newrelic.coffee","position":47,"original_position":47,"commit_id":"5ebb5d2fb9e9e3dc75f9ff2dbc50b6dff80654b2","original_commit_id":"5ebb5d2fb9e9e3dc75f9ff2dbc50b6dff80654b2","user":{"login":"champain","id":6773712,"avatar_url":"https://avatars0.githubusercontent.com/u/6773712?v=4","gravatar_id":"","url":"https://api.github.com/users/champain","html_url":"https://github.com/champain","followers_url":"https://api.github.com/users/champain/followers","following_url":"https://api.github.com/users/champain/following{/other_user}","gists_url":"https://api.github.com/users/champain/gists{/gist_id}","starred_url":"https://api.github.com/users/champain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/champain/subscriptions","organizations_url":"https://api.github.com/users/champain/orgs","repos_url":"https://api.github.com/users/champain/repos","events_url":"https://api.github.com/users/champain/events{/privacy}","received_events_url":"https://api.github.com/users/champain/received_events","type":"User","site_admin":false},"body":"Is this pagination number based on anything having to do with the number of possible deployments?","created_at":"2018-05-07T14:36:28Z","updated_at":"2018-05-07T14:36:28Z","html_url":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15#discussion_r186442813","pull_request_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/comments/186442813"},"html":{"href":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15#discussion_r186442813"},"pull_request":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15","id":185833565,"html_url":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15","diff_url":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15.diff","patch_url":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15.patch","issue_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/15","number":15,"state":"open","locked":false,"title":"Update 'cfgov-deployed' command to use APM API instead of Insights","user":{"login":"acrewdson","id":10353074,"avatar_url":"https://avatars0.githubusercontent.com/u/10353074?v=4","gravatar_id":"","url":"https://api.github.com/users/acrewdson","html_url":"https://github.com/acrewdson","followers_url":"https://api.github.com/users/acrewdson/followers","following_url":"https://api.github.com/users/acrewdson/following{/other_user}","gists_url":"https://api.github.com/users/acrewdson/gists{/gist_id}","starred_url":"https://api.github.com/users/acrewdson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrewdson/subscriptions","organizations_url":"https://api.github.com/users/acrewdson/orgs","repos_url":"https://api.github.com/users/acrewdson/repos","events_url":"https://api.github.com/users/acrewdson/events{/privacy}","received_events_url":"https://api.github.com/users/acrewdson/received_events","type":"User","site_admin":false},"body":"While it was a nicer solution to use NRQL and Insights to get this information, we can't be sure that our custom Insights events will stick around long enough, and the `cfgov-deployed` command's usefulness would be compromised as a result: deploys might stop showing up as custom events got truncated in Insights over time.\r\n\r\nHere we are updating the command to use the somewhat clunkier APM-based APIs. There should be no noticeable difference from the user perspective -- except for one improvement. Now that the deploy target ordering is explicit in the config file, we can order the results exactly as we want.","created_at":"2018-05-03T20:47:20Z","updated_at":"2018-05-07T14:36:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bc8d8bcf9f477017a723a353f65413ad32b833d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"OrlandoSoto","id":7442823,"avatar_url":"https://avatars3.githubusercontent.com/u/7442823?v=4","gravatar_id":"","url":"https://api.github.com/users/OrlandoSoto","html_url":"https://github.com/OrlandoSoto","followers_url":"https://api.github.com/users/OrlandoSoto/followers","following_url":"https://api.github.com/users/OrlandoSoto/following{/other_user}","gists_url":"https://api.github.com/users/OrlandoSoto/gists{/gist_id}","starred_url":"https://api.github.com/users/OrlandoSoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrlandoSoto/subscriptions","organizations_url":"https://api.github.com/users/OrlandoSoto/orgs","repos_url":"https://api.github.com/users/OrlandoSoto/repos","events_url":"https://api.github.com/users/OrlandoSoto/events{/privacy}","received_events_url":"https://api.github.com/users/OrlandoSoto/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15/commits","review_comments_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15/comments","review_comment_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/15/comments","statuses_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/statuses/5ebb5d2fb9e9e3dc75f9ff2dbc50b6dff80654b2","head":{"label":"acrewdson:use-apm-for-cfgov-deployed","ref":"use-apm-for-cfgov-deployed","sha":"5ebb5d2fb9e9e3dc75f9ff2dbc50b6dff80654b2","user":{"login":"acrewdson","id":10353074,"avatar_url":"https://avatars0.githubusercontent.com/u/10353074?v=4","gravatar_id":"","url":"https://api.github.com/users/acrewdson","html_url":"https://github.com/acrewdson","followers_url":"https://api.github.com/users/acrewdson/followers","following_url":"https://api.github.com/users/acrewdson/following{/other_user}","gists_url":"https://api.github.com/users/acrewdson/gists{/gist_id}","starred_url":"https://api.github.com/users/acrewdson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrewdson/subscriptions","organizations_url":"https://api.github.com/users/acrewdson/orgs","repos_url":"https://api.github.com/users/acrewdson/repos","events_url":"https://api.github.com/users/acrewdson/events{/privacy}","received_events_url":"https://api.github.com/users/acrewdson/received_events","type":"User","site_admin":false},"repo":{"id":126402111,"name":"hubot-newrelic2-cfpb","full_name":"acrewdson/hubot-newrelic2-cfpb","owner":{"login":"acrewdson","id":10353074,"avatar_url":"https://avatars0.githubusercontent.com/u/10353074?v=4","gravatar_id":"","url":"https://api.github.com/users/acrewdson","html_url":"https://github.com/acrewdson","followers_url":"https://api.github.com/users/acrewdson/followers","following_url":"https://api.github.com/users/acrewdson/following{/other_user}","gists_url":"https://api.github.com/users/acrewdson/gists{/gist_id}","starred_url":"https://api.github.com/users/acrewdson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrewdson/subscriptions","organizations_url":"https://api.github.com/users/acrewdson/orgs","repos_url":"https://api.github.com/users/acrewdson/repos","events_url":"https://api.github.com/users/acrewdson/events{/privacy}","received_events_url":"https://api.github.com/users/acrewdson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acrewdson/hubot-newrelic2-cfpb","description":"New Relic stats from Hubot","fork":true,"url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb","forks_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/forks","keys_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/teams","hooks_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/hooks","issue_events_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/issues/events{/number}","events_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/events","assignees_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/assignees{/user}","branches_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/branches{/branch}","tags_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/tags","blobs_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/git/refs{/sha}","trees_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/statuses/{sha}","languages_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/languages","stargazers_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/stargazers","contributors_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/contributors","subscribers_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/subscribers","subscription_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/subscription","commits_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/commits{/sha}","git_commits_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/git/commits{/sha}","comments_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/comments{/number}","issue_comment_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/issues/comments{/number}","contents_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/contents/{+path}","compare_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/merges","archive_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/downloads","issues_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/issues{/number}","pulls_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/pulls{/number}","milestones_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/milestones{/number}","notifications_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/labels{/name}","releases_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/releases{/id}","deployments_url":"https://api.github.com/repos/acrewdson/hubot-newrelic2-cfpb/deployments","created_at":"2018-03-22T22:26:12Z","updated_at":"2018-05-01T21:09:35Z","pushed_at":"2018-05-04T19:22:03Z","git_url":"git://github.com/acrewdson/hubot-newrelic2-cfpb.git","ssh_url":"git@github.com:acrewdson/hubot-newrelic2-cfpb.git","clone_url":"https://github.com/acrewdson/hubot-newrelic2-cfpb.git","svn_url":"https://github.com/acrewdson/hubot-newrelic2-cfpb","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cfpb:master","ref":"master","sha":"2d27acaf1f3ec88fa29d1fb0554d9c7266eda896","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars2.githubusercontent.com/u/1071563?v=4","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":88863066,"name":"hubot-newrelic2-cfpb","full_name":"cfpb/hubot-newrelic2-cfpb","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars2.githubusercontent.com/u/1071563?v=4","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/hubot-newrelic2-cfpb","description":"New Relic stats from Hubot","fork":true,"url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb","forks_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/forks","keys_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/teams","hooks_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/hooks","issue_events_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/events","assignees_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/tags","blobs_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/languages","stargazers_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/stargazers","contributors_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/contributors","subscribers_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/subscribers","subscription_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/subscription","commits_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/merges","archive_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/downloads","issues_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/releases{/id}","deployments_url":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/deployments","created_at":"2017-04-20T12:26:56Z","updated_at":"2018-05-01T21:09:19Z","pushed_at":"2018-05-04T19:22:04Z","git_url":"git://github.com/cfpb/hubot-newrelic2-cfpb.git","ssh_url":"git@github.com:cfpb/hubot-newrelic2-cfpb.git","clone_url":"https://github.com/cfpb/hubot-newrelic2-cfpb.git","svn_url":"https://github.com/cfpb/hubot-newrelic2-cfpb","homepage":null,"size":169,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15"},"html":{"href":"https://github.com/cfpb/hubot-newrelic2-cfpb/pull/15"},"issue":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/15"},"comments":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/cfpb/hubot-newrelic2-cfpb/statuses/5ebb5d2fb9e9e3dc75f9ff2dbc50b6dff80654b2"}},"author_association":"NONE"}}
{"actor":{"display_login":"champain"}}