{"action":"created","comment":{"url":"https://api.github.com/repos/balena-io/balena-cli/pulls/comments/244425227","pull_request_review_id":188382543,"id":244425227,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDQyNTIyNw==","diff_hunk":"@@ -349,13 +349,40 @@ tagServiceImages = (docker, images, serviceImages) ->\n \t\t\tlogs: d.logs\n \t\t\tprops: d.props\n \n-authorizePush = (tokenAuthEndpoint, registry, images) ->\n+\n+getPreviousRepos = (logger, appID) ->\n+\tsdk = require('balena-sdk').fromSharedOptions()\n+\tsdk.pine.get(\n+\t\tresource: 'release'\n+\t\toptions:\n+\t\t\t$filter:\n+\t\t\t\tbelongs_to__application: appID\n+\t\t\t\tstatus: 'success'\n+\t\t\t$expand:\n+\t\t\t\tcontains__image:\n+\t\t\t\t\t$expand: 'image'\n+\t)\n+\n+\t.then (release) ->\n+            # grab all images from the latest release, return all image locations in the registry\n+\t\timages = release[0].contains__image\n+\t\trepos = []\n+\t\tfor i in images\n+\t\t\timageName = i.image[0].is_stored_at__image_location\n+\t\t\t[ _, _, repoName, _ = 'latest' ] = /(.*?)\\/(.*?)(?::([^/]*))?$/.exec(imageName)","path":"lib/utils/compose.coffee","position":25,"original_position":25,"commit_id":"790f847bb2f9dc2044742f26d55b0f342e3db0b2","original_commit_id":"790f847bb2f9dc2044742f26d55b0f342e3db0b2","user":{"login":"pcarranzav","id":2223590,"node_id":"MDQ6VXNlcjIyMjM1OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223590?v=4","gravatar_id":"","url":"https://api.github.com/users/pcarranzav","html_url":"https://github.com/pcarranzav","followers_url":"https://api.github.com/users/pcarranzav/followers","following_url":"https://api.github.com/users/pcarranzav/following{/other_user}","gists_url":"https://api.github.com/users/pcarranzav/gists{/gist_id}","starred_url":"https://api.github.com/users/pcarranzav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcarranzav/subscriptions","organizations_url":"https://api.github.com/users/pcarranzav/orgs","repos_url":"https://api.github.com/users/pcarranzav/repos","events_url":"https://api.github.com/users/pcarranzav/events{/privacy}","received_events_url":"https://api.github.com/users/pcarranzav/received_events","type":"User","site_admin":false},"body":"Might be better to use a tighter regex, as in https://github.com/balena-io-modules/docker-toolbelt/blob/master/lib/docker-toolbelt.coffee#L338 (you could even use that docker-toolbelt module)","created_at":"2018-12-28T23:13:46Z","updated_at":"2018-12-28T23:16:33Z","html_url":"https://github.com/balena-io/balena-cli/pull/1057#discussion_r244425227","pull_request_url":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/comments/244425227"},"html":{"href":"https://github.com/balena-io/balena-cli/pull/1057#discussion_r244425227"},"pull_request":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057"}}},"pull_request":{"url":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057","id":241354929,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMzU0OTI5","html_url":"https://github.com/balena-io/balena-cli/pull/1057","diff_url":"https://github.com/balena-io/balena-cli/pull/1057.diff","patch_url":"https://github.com/balena-io/balena-cli/pull/1057.patch","issue_url":"https://api.github.com/repos/balena-io/balena-cli/issues/1057","number":1057,"state":"open","locked":false,"title":"Request access to previously pushed release when pushing via \\`balena…","user":{"login":"xginn8","id":6697261,"node_id":"MDQ6VXNlcjY2OTcyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/6697261?v=4","gravatar_id":"","url":"https://api.github.com/users/xginn8","html_url":"https://github.com/xginn8","followers_url":"https://api.github.com/users/xginn8/followers","following_url":"https://api.github.com/users/xginn8/following{/other_user}","gists_url":"https://api.github.com/users/xginn8/gists{/gist_id}","starred_url":"https://api.github.com/users/xginn8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xginn8/subscriptions","organizations_url":"https://api.github.com/users/xginn8/orgs","repos_url":"https://api.github.com/users/xginn8/repos","events_url":"https://api.github.com/users/xginn8/events{/privacy}","received_events_url":"https://api.github.com/users/xginn8/received_events","type":"User","site_admin":false},"body":"… deploy\\`\r\n\r\nThis access is used to cross mount the old layers, rather than\r\nreuploading the layers each time.\r\n\r\nConnects-to: #1045\r\nChange-type: minor\r\nSigned-off-by: Matthew McGinn <mamcgi@gmail.com>\r\n\r\n- [x] Affects the development, build or deployment processes of the component\r\n","created_at":"2018-12-28T15:50:31Z","updated_at":"2018-12-28T23:16:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c79dea7fc44c440064ee47cc35b025e6beef010c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dfunckt","id":130359,"node_id":"MDQ6VXNlcjEzMDM1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/130359?v=4","gravatar_id":"","url":"https://api.github.com/users/dfunckt","html_url":"https://github.com/dfunckt","followers_url":"https://api.github.com/users/dfunckt/followers","following_url":"https://api.github.com/users/dfunckt/following{/other_user}","gists_url":"https://api.github.com/users/dfunckt/gists{/gist_id}","starred_url":"https://api.github.com/users/dfunckt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfunckt/subscriptions","organizations_url":"https://api.github.com/users/dfunckt/orgs","repos_url":"https://api.github.com/users/dfunckt/repos","events_url":"https://api.github.com/users/dfunckt/events{/privacy}","received_events_url":"https://api.github.com/users/dfunckt/received_events","type":"User","site_admin":false},{"login":"thgreasi","id":1295829,"node_id":"MDQ6VXNlcjEyOTU4Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1295829?v=4","gravatar_id":"","url":"https://api.github.com/users/thgreasi","html_url":"https://github.com/thgreasi","followers_url":"https://api.github.com/users/thgreasi/followers","following_url":"https://api.github.com/users/thgreasi/following{/other_user}","gists_url":"https://api.github.com/users/thgreasi/gists{/gist_id}","starred_url":"https://api.github.com/users/thgreasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thgreasi/subscriptions","organizations_url":"https://api.github.com/users/thgreasi/orgs","repos_url":"https://api.github.com/users/thgreasi/repos","events_url":"https://api.github.com/users/thgreasi/events{/privacy}","received_events_url":"https://api.github.com/users/thgreasi/received_events","type":"User","site_admin":false},{"login":"pdcastro","id":15091591,"node_id":"MDQ6VXNlcjE1MDkxNTkx","avatar_url":"https://avatars3.githubusercontent.com/u/15091591?v=4","gravatar_id":"","url":"https://api.github.com/users/pdcastro","html_url":"https://github.com/pdcastro","followers_url":"https://api.github.com/users/pdcastro/followers","following_url":"https://api.github.com/users/pdcastro/following{/other_user}","gists_url":"https://api.github.com/users/pdcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/pdcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdcastro/subscriptions","organizations_url":"https://api.github.com/users/pdcastro/orgs","repos_url":"https://api.github.com/users/pdcastro/repos","events_url":"https://api.github.com/users/pdcastro/events{/privacy}","received_events_url":"https://api.github.com/users/pdcastro/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057/commits","review_comments_url":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057/comments","review_comment_url":"https://api.github.com/repos/balena-io/balena-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/balena-io/balena-cli/issues/1057/comments","statuses_url":"https://api.github.com/repos/balena-io/balena-cli/statuses/790f847bb2f9dc2044742f26d55b0f342e3db0b2","head":{"label":"balena-io:access_old_repos","ref":"access_old_repos","sha":"790f847bb2f9dc2044742f26d55b0f342e3db0b2","user":{"login":"balena-io","id":6157842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTc4NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6157842?v=4","gravatar_id":"","url":"https://api.github.com/users/balena-io","html_url":"https://github.com/balena-io","followers_url":"https://api.github.com/users/balena-io/followers","following_url":"https://api.github.com/users/balena-io/following{/other_user}","gists_url":"https://api.github.com/users/balena-io/gists{/gist_id}","starred_url":"https://api.github.com/users/balena-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balena-io/subscriptions","organizations_url":"https://api.github.com/users/balena-io/orgs","repos_url":"https://api.github.com/users/balena-io/repos","events_url":"https://api.github.com/users/balena-io/events{/privacy}","received_events_url":"https://api.github.com/users/balena-io/received_events","type":"Organization","site_admin":false},"repo":{"id":31549380,"node_id":"MDEwOlJlcG9zaXRvcnkzMTU0OTM4MA==","name":"balena-cli","full_name":"balena-io/balena-cli","private":false,"owner":{"login":"balena-io","id":6157842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTc4NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6157842?v=4","gravatar_id":"","url":"https://api.github.com/users/balena-io","html_url":"https://github.com/balena-io","followers_url":"https://api.github.com/users/balena-io/followers","following_url":"https://api.github.com/users/balena-io/following{/other_user}","gists_url":"https://api.github.com/users/balena-io/gists{/gist_id}","starred_url":"https://api.github.com/users/balena-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balena-io/subscriptions","organizations_url":"https://api.github.com/users/balena-io/orgs","repos_url":"https://api.github.com/users/balena-io/repos","events_url":"https://api.github.com/users/balena-io/events{/privacy}","received_events_url":"https://api.github.com/users/balena-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/balena-io/balena-cli","description":"The official balena CLI tool.","fork":false,"url":"https://api.github.com/repos/balena-io/balena-cli","forks_url":"https://api.github.com/repos/balena-io/balena-cli/forks","keys_url":"https://api.github.com/repos/balena-io/balena-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balena-io/balena-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balena-io/balena-cli/teams","hooks_url":"https://api.github.com/repos/balena-io/balena-cli/hooks","issue_events_url":"https://api.github.com/repos/balena-io/balena-cli/issues/events{/number}","events_url":"https://api.github.com/repos/balena-io/balena-cli/events","assignees_url":"https://api.github.com/repos/balena-io/balena-cli/assignees{/user}","branches_url":"https://api.github.com/repos/balena-io/balena-cli/branches{/branch}","tags_url":"https://api.github.com/repos/balena-io/balena-cli/tags","blobs_url":"https://api.github.com/repos/balena-io/balena-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balena-io/balena-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balena-io/balena-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/balena-io/balena-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balena-io/balena-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/balena-io/balena-cli/languages","stargazers_url":"https://api.github.com/repos/balena-io/balena-cli/stargazers","contributors_url":"https://api.github.com/repos/balena-io/balena-cli/contributors","subscribers_url":"https://api.github.com/repos/balena-io/balena-cli/subscribers","subscription_url":"https://api.github.com/repos/balena-io/balena-cli/subscription","commits_url":"https://api.github.com/repos/balena-io/balena-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/balena-io/balena-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/balena-io/balena-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/balena-io/balena-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/balena-io/balena-cli/contents/{+path}","compare_url":"https://api.github.com/repos/balena-io/balena-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balena-io/balena-cli/merges","archive_url":"https://api.github.com/repos/balena-io/balena-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balena-io/balena-cli/downloads","issues_url":"https://api.github.com/repos/balena-io/balena-cli/issues{/number}","pulls_url":"https://api.github.com/repos/balena-io/balena-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/balena-io/balena-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/balena-io/balena-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balena-io/balena-cli/labels{/name}","releases_url":"https://api.github.com/repos/balena-io/balena-cli/releases{/id}","deployments_url":"https://api.github.com/repos/balena-io/balena-cli/deployments","created_at":"2015-03-02T16:18:03Z","updated_at":"2018-12-28T22:11:26Z","pushed_at":"2018-12-28T22:11:26Z","git_url":"git://github.com/balena-io/balena-cli.git","ssh_url":"git@github.com:balena-io/balena-cli.git","clone_url":"https://github.com/balena-io/balena-cli.git","svn_url":"https://github.com/balena-io/balena-cli","homepage":"","size":2847,"stargazers_count":91,"watchers_count":91,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":177,"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":23,"open_issues":177,"watchers":91,"default_branch":"master"}},"base":{"label":"balena-io:master","ref":"master","sha":"7713ca31e58e47fe61585fcdfec530c710186a48","user":{"login":"balena-io","id":6157842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTc4NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6157842?v=4","gravatar_id":"","url":"https://api.github.com/users/balena-io","html_url":"https://github.com/balena-io","followers_url":"https://api.github.com/users/balena-io/followers","following_url":"https://api.github.com/users/balena-io/following{/other_user}","gists_url":"https://api.github.com/users/balena-io/gists{/gist_id}","starred_url":"https://api.github.com/users/balena-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balena-io/subscriptions","organizations_url":"https://api.github.com/users/balena-io/orgs","repos_url":"https://api.github.com/users/balena-io/repos","events_url":"https://api.github.com/users/balena-io/events{/privacy}","received_events_url":"https://api.github.com/users/balena-io/received_events","type":"Organization","site_admin":false},"repo":{"id":31549380,"node_id":"MDEwOlJlcG9zaXRvcnkzMTU0OTM4MA==","name":"balena-cli","full_name":"balena-io/balena-cli","private":false,"owner":{"login":"balena-io","id":6157842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTc4NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6157842?v=4","gravatar_id":"","url":"https://api.github.com/users/balena-io","html_url":"https://github.com/balena-io","followers_url":"https://api.github.com/users/balena-io/followers","following_url":"https://api.github.com/users/balena-io/following{/other_user}","gists_url":"https://api.github.com/users/balena-io/gists{/gist_id}","starred_url":"https://api.github.com/users/balena-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balena-io/subscriptions","organizations_url":"https://api.github.com/users/balena-io/orgs","repos_url":"https://api.github.com/users/balena-io/repos","events_url":"https://api.github.com/users/balena-io/events{/privacy}","received_events_url":"https://api.github.com/users/balena-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/balena-io/balena-cli","description":"The official balena CLI tool.","fork":false,"url":"https://api.github.com/repos/balena-io/balena-cli","forks_url":"https://api.github.com/repos/balena-io/balena-cli/forks","keys_url":"https://api.github.com/repos/balena-io/balena-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balena-io/balena-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balena-io/balena-cli/teams","hooks_url":"https://api.github.com/repos/balena-io/balena-cli/hooks","issue_events_url":"https://api.github.com/repos/balena-io/balena-cli/issues/events{/number}","events_url":"https://api.github.com/repos/balena-io/balena-cli/events","assignees_url":"https://api.github.com/repos/balena-io/balena-cli/assignees{/user}","branches_url":"https://api.github.com/repos/balena-io/balena-cli/branches{/branch}","tags_url":"https://api.github.com/repos/balena-io/balena-cli/tags","blobs_url":"https://api.github.com/repos/balena-io/balena-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balena-io/balena-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balena-io/balena-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/balena-io/balena-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balena-io/balena-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/balena-io/balena-cli/languages","stargazers_url":"https://api.github.com/repos/balena-io/balena-cli/stargazers","contributors_url":"https://api.github.com/repos/balena-io/balena-cli/contributors","subscribers_url":"https://api.github.com/repos/balena-io/balena-cli/subscribers","subscription_url":"https://api.github.com/repos/balena-io/balena-cli/subscription","commits_url":"https://api.github.com/repos/balena-io/balena-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/balena-io/balena-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/balena-io/balena-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/balena-io/balena-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/balena-io/balena-cli/contents/{+path}","compare_url":"https://api.github.com/repos/balena-io/balena-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balena-io/balena-cli/merges","archive_url":"https://api.github.com/repos/balena-io/balena-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balena-io/balena-cli/downloads","issues_url":"https://api.github.com/repos/balena-io/balena-cli/issues{/number}","pulls_url":"https://api.github.com/repos/balena-io/balena-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/balena-io/balena-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/balena-io/balena-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balena-io/balena-cli/labels{/name}","releases_url":"https://api.github.com/repos/balena-io/balena-cli/releases{/id}","deployments_url":"https://api.github.com/repos/balena-io/balena-cli/deployments","created_at":"2015-03-02T16:18:03Z","updated_at":"2018-12-28T22:11:26Z","pushed_at":"2018-12-28T22:11:26Z","git_url":"git://github.com/balena-io/balena-cli.git","ssh_url":"git@github.com:balena-io/balena-cli.git","clone_url":"https://github.com/balena-io/balena-cli.git","svn_url":"https://github.com/balena-io/balena-cli","homepage":"","size":2847,"stargazers_count":91,"watchers_count":91,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":177,"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":23,"open_issues":177,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057"},"html":{"href":"https://github.com/balena-io/balena-cli/pull/1057"},"issue":{"href":"https://api.github.com/repos/balena-io/balena-cli/issues/1057"},"comments":{"href":"https://api.github.com/repos/balena-io/balena-cli/issues/1057/comments"},"review_comments":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057/comments"},"review_comment":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/balena-io/balena-cli/pulls/1057/commits"},"statuses":{"href":"https://api.github.com/repos/balena-io/balena-cli/statuses/790f847bb2f9dc2044742f26d55b0f342e3db0b2"}},"author_association":"NONE"}}
{"actor":{"display_login":"pcarranzav"}}