{"action":"closed","number":1644,"pull_request":{"url":"https://api.github.com/repos/heroku/heroku/pulls/1644","id":39237705,"html_url":"https://github.com/heroku/heroku/pull/1644","diff_url":"https://github.com/heroku/heroku/pull/1644.diff","patch_url":"https://github.com/heroku/heroku/pull/1644.patch","issue_url":"https://api.github.com/repos/heroku/heroku/issues/1644","number":1644,"state":"closed","locked":false,"title":"Group attachments by resource in pg:info","user":{"login":"bjeanes","id":2560,"avatar_url":"https://avatars.githubusercontent.com/u/2560?v=3","gravatar_id":"","url":"https://api.github.com/users/bjeanes","html_url":"https://github.com/bjeanes","followers_url":"https://api.github.com/users/bjeanes/followers","following_url":"https://api.github.com/users/bjeanes/following{/other_user}","gists_url":"https://api.github.com/users/bjeanes/gists{/gist_id}","starred_url":"https://api.github.com/users/bjeanes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjeanes/subscriptions","organizations_url":"https://api.github.com/users/bjeanes/orgs","repos_url":"https://api.github.com/users/bjeanes/repos","events_url":"https://api.github.com/users/bjeanes/events{/privacy}","received_events_url":"https://api.github.com/users/bjeanes/received_events","type":"User","site_admin":false},"body":"Bonus: this likely makes fewer requests for multiple attachments.\r\n\r\nAlternate to #1643; closer to what was discussed with @neovintage and @chadbailey59 as per https://github.com/heroku/heroku/pull/1605#issuecomment-112475786.\r\n\r\nOutput, from specs:\r\n\r\n```\r\n=== HEROKU_POSTGRESQL_IVORY_URL, DATABASE_URL\r\nPlan:        Ronin\r\nStatus:      available\r\nData Size:   1 MB\r\nTables:      1\r\nPG Version:  9.1.4\r\nFork/Follow: Available\r\nCreated:     2011-12-13 00:00 UTC\r\nMaintenance: not required\r\nAdd-on:      loudly-yelling-1232\r\n\r\n=== HEROKU_POSTGRESQL_RONIN_URL\r\nPlan:        Ronin\r\nStatus:      available\r\nData Size:   1 MB\r\nTables:      1\r\nPG Version:  9.1.4\r\nFork/Follow: Available\r\nCreated:     2011-12-13 00:00 UTC\r\nMaintenance: not required\r\nAdd-on:      softly-mocking-123\r\n```\r\n\r\nImportantly, it groups *all* attachments of the same add-on, only makes one request per *resource* to get the info, puts `DATABASE_URL` last still (though not in a parenthetical).\r\n\r\nattn: @neovintage @chadbailey59 @stevo550 @heroku/add-ons ","created_at":"2015-07-06T05:51:46Z","updated_at":"2015-07-09T00:12:02Z","closed_at":"2015-07-09T00:12:02Z","merged_at":"2015-07-09T00:12:02Z","merge_commit_sha":"4ddc5b6d2110d5a5d973610b1237f5a2ca9b4650","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/heroku/heroku/pulls/1644/commits","review_comments_url":"https://api.github.com/repos/heroku/heroku/pulls/1644/comments","review_comment_url":"https://api.github.com/repos/heroku/heroku/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heroku/heroku/issues/1644/comments","statuses_url":"https://api.github.com/repos/heroku/heroku/statuses/5b3e4f7bd7d72820a2e14ab20e8071eeba35210d","head":{"label":"heroku:group-attachments-by-resource-for-pg-info","ref":"group-attachments-by-resource-for-pg-info","sha":"5b3e4f7bd7d72820a2e14ab20e8071eeba35210d","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":153204,"name":"heroku","full_name":"heroku/heroku","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/heroku","description":"Heroku CLI","fork":false,"url":"https://api.github.com/repos/heroku/heroku","forks_url":"https://api.github.com/repos/heroku/heroku/forks","keys_url":"https://api.github.com/repos/heroku/heroku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/heroku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/heroku/teams","hooks_url":"https://api.github.com/repos/heroku/heroku/hooks","issue_events_url":"https://api.github.com/repos/heroku/heroku/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/heroku/events","assignees_url":"https://api.github.com/repos/heroku/heroku/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/heroku/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/heroku/tags","blobs_url":"https://api.github.com/repos/heroku/heroku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/heroku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/heroku/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/heroku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/heroku/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/heroku/languages","stargazers_url":"https://api.github.com/repos/heroku/heroku/stargazers","contributors_url":"https://api.github.com/repos/heroku/heroku/contributors","subscribers_url":"https://api.github.com/repos/heroku/heroku/subscribers","subscription_url":"https://api.github.com/repos/heroku/heroku/subscription","commits_url":"https://api.github.com/repos/heroku/heroku/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/heroku/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/heroku/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/heroku/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/heroku/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/heroku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/heroku/merges","archive_url":"https://api.github.com/repos/heroku/heroku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/heroku/downloads","issues_url":"https://api.github.com/repos/heroku/heroku/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/heroku/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/heroku/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/heroku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/heroku/labels{/name}","releases_url":"https://api.github.com/repos/heroku/heroku/releases{/id}","created_at":"2009-03-18T01:21:53Z","updated_at":"2015-07-07T22:39:55Z","pushed_at":"2015-07-09T00:12:02Z","git_url":"git://github.com/heroku/heroku.git","ssh_url":"git@github.com:heroku/heroku.git","clone_url":"https://github.com/heroku/heroku.git","svn_url":"https://github.com/heroku/heroku","homepage":"https://devcenter.heroku.com/articles/heroku-command","size":14681,"stargazers_count":1155,"watchers_count":1155,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":327,"mirror_url":null,"open_issues_count":239,"forks":327,"open_issues":239,"watchers":1155,"default_branch":"master"}},"base":{"label":"heroku:master","ref":"master","sha":"59023df8cc735db62f7aa20fb3419d9cd8e837d7","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":153204,"name":"heroku","full_name":"heroku/heroku","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/heroku","description":"Heroku CLI","fork":false,"url":"https://api.github.com/repos/heroku/heroku","forks_url":"https://api.github.com/repos/heroku/heroku/forks","keys_url":"https://api.github.com/repos/heroku/heroku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/heroku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/heroku/teams","hooks_url":"https://api.github.com/repos/heroku/heroku/hooks","issue_events_url":"https://api.github.com/repos/heroku/heroku/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/heroku/events","assignees_url":"https://api.github.com/repos/heroku/heroku/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/heroku/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/heroku/tags","blobs_url":"https://api.github.com/repos/heroku/heroku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/heroku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/heroku/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/heroku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/heroku/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/heroku/languages","stargazers_url":"https://api.github.com/repos/heroku/heroku/stargazers","contributors_url":"https://api.github.com/repos/heroku/heroku/contributors","subscribers_url":"https://api.github.com/repos/heroku/heroku/subscribers","subscription_url":"https://api.github.com/repos/heroku/heroku/subscription","commits_url":"https://api.github.com/repos/heroku/heroku/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/heroku/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/heroku/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/heroku/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/heroku/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/heroku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/heroku/merges","archive_url":"https://api.github.com/repos/heroku/heroku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/heroku/downloads","issues_url":"https://api.github.com/repos/heroku/heroku/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/heroku/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/heroku/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/heroku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/heroku/labels{/name}","releases_url":"https://api.github.com/repos/heroku/heroku/releases{/id}","created_at":"2009-03-18T01:21:53Z","updated_at":"2015-07-07T22:39:55Z","pushed_at":"2015-07-09T00:12:02Z","git_url":"git://github.com/heroku/heroku.git","ssh_url":"git@github.com:heroku/heroku.git","clone_url":"https://github.com/heroku/heroku.git","svn_url":"https://github.com/heroku/heroku","homepage":"https://devcenter.heroku.com/articles/heroku-command","size":14681,"stargazers_count":1155,"watchers_count":1155,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":327,"mirror_url":null,"open_issues_count":239,"forks":327,"open_issues":239,"watchers":1155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heroku/heroku/pulls/1644"},"html":{"href":"https://github.com/heroku/heroku/pull/1644"},"issue":{"href":"https://api.github.com/repos/heroku/heroku/issues/1644"},"comments":{"href":"https://api.github.com/repos/heroku/heroku/issues/1644/comments"},"review_comments":{"href":"https://api.github.com/repos/heroku/heroku/pulls/1644/comments"},"review_comment":{"href":"https://api.github.com/repos/heroku/heroku/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heroku/heroku/pulls/1644/commits"},"statuses":{"href":"https://api.github.com/repos/heroku/heroku/statuses/5b3e4f7bd7d72820a2e14ab20e8071eeba35210d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"dickeyxxx","id":216188,"avatar_url":"https://avatars.githubusercontent.com/u/216188?v=3","gravatar_id":"","url":"https://api.github.com/users/dickeyxxx","html_url":"https://github.com/dickeyxxx","followers_url":"https://api.github.com/users/dickeyxxx/followers","following_url":"https://api.github.com/users/dickeyxxx/following{/other_user}","gists_url":"https://api.github.com/users/dickeyxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/dickeyxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dickeyxxx/subscriptions","organizations_url":"https://api.github.com/users/dickeyxxx/orgs","repos_url":"https://api.github.com/users/dickeyxxx/repos","events_url":"https://api.github.com/users/dickeyxxx/events{/privacy}","received_events_url":"https://api.github.com/users/dickeyxxx/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":4,"additions":24,"deletions":9,"changed_files":2}}