{"action":"created","comment":{"url":"https://api.github.com/repos/kontena/kontena/pulls/comments/89884283","pull_request_review_id":10414973,"id":89884283,"diff_hunk":"@@ -0,0 +1,32 @@\n+require_relative '../common'\n+\n+module Kontena::Cli::Stacks::Registry\n+  class RemoveCommand < Kontena::Command\n+    include Kontena::Cli::Common\n+    include Kontena::Cli::Stacks::Common\n+    include Kontena::Cli::Stacks::Common::StackNameParam\n+\n+    banner \"Removes a stack (or version) from the stack registry. Use user/stack_name or user/stack_name:version.\"\n+\n+    parameter \"[FILENAME]\", \"Stack file path\"\n+\n+    option ['-f', '--force'], :flag, \"Force delete\"\n+\n+    requires_current_account_token\n+\n+    def execute\n+      unless force?\n+        if stack_name.include?(':')\n+          puts \"About to delete #{pastel.cyan(stack_name)} from the stacks registry\"\n+          confirm\n+        else\n+          puts \"About to delete an entire stack and all of its versions from the stacks registry\"\n+          confirm_command(stack_name)\n+        end\n+      end\n+      spinner \"Removing #{pastel.cyan(stack_name)} from the registry\" do\n+        stacks_client.destroy(stack_name)","path":"cli/lib/kontena/cli/stacks/registry/remove_command.rb","position":28,"original_position":28,"commit_id":"1b907f8645d4de88169958ad61f2d5652b858d0f","original_commit_id":"1b907f8645d4de88169958ad61f2d5652b858d0f","user":{"login":"kke","id":224971,"avatar_url":"https://avatars.githubusercontent.com/u/224971?v=3","gravatar_id":"","url":"https://api.github.com/users/kke","html_url":"https://github.com/kke","followers_url":"https://api.github.com/users/kke/followers","following_url":"https://api.github.com/users/kke/following{/other_user}","gists_url":"https://api.github.com/users/kke/gists{/gist_id}","starred_url":"https://api.github.com/users/kke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kke/subscriptions","organizations_url":"https://api.github.com/users/kke/orgs","repos_url":"https://api.github.com/users/kke/repos","events_url":"https://api.github.com/users/kke/events{/privacy}","received_events_url":"https://api.github.com/users/kke/received_events","type":"User","site_admin":false},"body":"(y)\r\n","created_at":"2016-11-28T21:06:14Z","updated_at":"2016-11-28T21:06:14Z","html_url":"https://github.com/kontena/kontena/pull/1403#discussion_r89884283","pull_request_url":"https://api.github.com/repos/kontena/kontena/pulls/1403","_links":{"self":{"href":"https://api.github.com/repos/kontena/kontena/pulls/comments/89884283"},"html":{"href":"https://github.com/kontena/kontena/pull/1403#discussion_r89884283"},"pull_request":{"href":"https://api.github.com/repos/kontena/kontena/pulls/1403"}}},"pull_request":{"url":"https://api.github.com/repos/kontena/kontena/pulls/1403","id":95318995,"html_url":"https://github.com/kontena/kontena/pull/1403","diff_url":"https://github.com/kontena/kontena/pull/1403.diff","patch_url":"https://github.com/kontena/kontena/pull/1403.patch","issue_url":"https://api.github.com/repos/kontena/kontena/issues/1403","number":1403,"state":"open","locked":false,"title":"Stack registry integration","user":{"login":"kke","id":224971,"avatar_url":"https://avatars.githubusercontent.com/u/224971?v=3","gravatar_id":"","url":"https://api.github.com/users/kke","html_url":"https://github.com/kke","followers_url":"https://api.github.com/users/kke/followers","following_url":"https://api.github.com/users/kke/following{/other_user}","gists_url":"https://api.github.com/users/kke/gists{/gist_id}","starred_url":"https://api.github.com/users/kke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kke/subscriptions","organizations_url":"https://api.github.com/users/kke/orgs","repos_url":"https://api.github.com/users/kke/repos","events_url":"https://api.github.com/users/kke/events{/privacy}","received_events_url":"https://api.github.com/users/kke/received_events","type":"User","site_admin":false},"body":"Implements the commands to interact with the registry:\r\n\r\n```\r\n$ kontena stack pull [-f filename.yml] user/stack:version\r\n$ kontena stack push filename.yml\r\n$ kontena stack delete user/stack:version\r\n$ kontena stack search [foo]\r\n$ kontena stack info user/stack\r\n```\r\n\r\nAnd makes stacks loadable / extendable from registry:\r\n\r\n```ruby\r\n> r = Kontena::Cli::Stacks::YAML::Reader.new('kke/barstack:1.0.0', from_registry: true)\r\n> puts r.yaml.split(\"\\n\").join(\"\\n# \")\r\n# stack: kke/barstack\r\n# version: 1.0.0\r\n# description: Foofoofoo\r\n# services:\r\n#   mysql:\r\n#    extends:\r\n#     stack: kke/dummystack:1.0.0\r\n#     service: foofoo\r\n> r.execute\r\n=> {:stack=>\"kke/barstack\", :version=>\"1.0.0\", :name=>\"barstack\", :expose=>nil, :errors=>[], :notifications=>[], \r\n:services=>{\"mysql\"=>{\"image\"=>\"mysql\", \"environment\"=>[\"FOO=bar\"], \"secrets\"=>[]}\r\n}, :variables=>{}}\r\n```\r\n","created_at":"2016-11-25T15:19:24Z","updated_at":"2016-11-28T21:06:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"588bf50cab1295b47505bcae5191b069bcd26909","assignee":{"login":"kke","id":224971,"avatar_url":"https://avatars.githubusercontent.com/u/224971?v=3","gravatar_id":"","url":"https://api.github.com/users/kke","html_url":"https://github.com/kke","followers_url":"https://api.github.com/users/kke/followers","following_url":"https://api.github.com/users/kke/following{/other_user}","gists_url":"https://api.github.com/users/kke/gists{/gist_id}","starred_url":"https://api.github.com/users/kke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kke/subscriptions","organizations_url":"https://api.github.com/users/kke/orgs","repos_url":"https://api.github.com/users/kke/repos","events_url":"https://api.github.com/users/kke/events{/privacy}","received_events_url":"https://api.github.com/users/kke/received_events","type":"User","site_admin":false},"assignees":[{"login":"kke","id":224971,"avatar_url":"https://avatars.githubusercontent.com/u/224971?v=3","gravatar_id":"","url":"https://api.github.com/users/kke","html_url":"https://github.com/kke","followers_url":"https://api.github.com/users/kke/followers","following_url":"https://api.github.com/users/kke/following{/other_user}","gists_url":"https://api.github.com/users/kke/gists{/gist_id}","starred_url":"https://api.github.com/users/kke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kke/subscriptions","organizations_url":"https://api.github.com/users/kke/orgs","repos_url":"https://api.github.com/users/kke/repos","events_url":"https://api.github.com/users/kke/events{/privacy}","received_events_url":"https://api.github.com/users/kke/received_events","type":"User","site_admin":false},{"login":"SpComb","id":3950373,"avatar_url":"https://avatars.githubusercontent.com/u/3950373?v=3","gravatar_id":"","url":"https://api.github.com/users/SpComb","html_url":"https://github.com/SpComb","followers_url":"https://api.github.com/users/SpComb/followers","following_url":"https://api.github.com/users/SpComb/following{/other_user}","gists_url":"https://api.github.com/users/SpComb/gists{/gist_id}","starred_url":"https://api.github.com/users/SpComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpComb/subscriptions","organizations_url":"https://api.github.com/users/SpComb/orgs","repos_url":"https://api.github.com/users/SpComb/repos","events_url":"https://api.github.com/users/SpComb/events{/privacy}","received_events_url":"https://api.github.com/users/SpComb/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kontena/kontena/milestones/53","html_url":"https://github.com/kontena/kontena/milestones/1.0.0","labels_url":"https://api.github.com/repos/kontena/kontena/milestones/53/labels","id":2052699,"number":53,"title":"1.0.0","description":"- stacks\r\n- network refactoring\r\n- api freeze","creator":{"login":"jakolehm","id":1446224,"avatar_url":"https://avatars.githubusercontent.com/u/1446224?v=3","gravatar_id":"","url":"https://api.github.com/users/jakolehm","html_url":"https://github.com/jakolehm","followers_url":"https://api.github.com/users/jakolehm/followers","following_url":"https://api.github.com/users/jakolehm/following{/other_user}","gists_url":"https://api.github.com/users/jakolehm/gists{/gist_id}","starred_url":"https://api.github.com/users/jakolehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakolehm/subscriptions","organizations_url":"https://api.github.com/users/jakolehm/orgs","repos_url":"https://api.github.com/users/jakolehm/repos","events_url":"https://api.github.com/users/jakolehm/events{/privacy}","received_events_url":"https://api.github.com/users/jakolehm/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":90,"state":"open","created_at":"2016-10-06T15:42:07Z","updated_at":"2016-11-28T20:42:39Z","due_on":"2016-11-30T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kontena/kontena/pulls/1403/commits","review_comments_url":"https://api.github.com/repos/kontena/kontena/pulls/1403/comments","review_comment_url":"https://api.github.com/repos/kontena/kontena/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kontena/kontena/issues/1403/comments","statuses_url":"https://api.github.com/repos/kontena/kontena/statuses/1b907f8645d4de88169958ad61f2d5652b858d0f","head":{"label":"kontena:feature/stack_registry_integration","ref":"feature/stack_registry_integration","sha":"1b907f8645d4de88169958ad61f2d5652b858d0f","user":{"login":"kontena","id":10419574,"avatar_url":"https://avatars.githubusercontent.com/u/10419574?v=3","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"repo":{"id":32689932,"name":"kontena","full_name":"kontena/kontena","owner":{"login":"kontena","id":10419574,"avatar_url":"https://avatars.githubusercontent.com/u/10419574?v=3","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kontena/kontena","description":"The developer friendly container and micro services platform. Works on any cloud, easy to setup, simple to use.","fork":false,"url":"https://api.github.com/repos/kontena/kontena","forks_url":"https://api.github.com/repos/kontena/kontena/forks","keys_url":"https://api.github.com/repos/kontena/kontena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kontena/kontena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kontena/kontena/teams","hooks_url":"https://api.github.com/repos/kontena/kontena/hooks","issue_events_url":"https://api.github.com/repos/kontena/kontena/issues/events{/number}","events_url":"https://api.github.com/repos/kontena/kontena/events","assignees_url":"https://api.github.com/repos/kontena/kontena/assignees{/user}","branches_url":"https://api.github.com/repos/kontena/kontena/branches{/branch}","tags_url":"https://api.github.com/repos/kontena/kontena/tags","blobs_url":"https://api.github.com/repos/kontena/kontena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kontena/kontena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kontena/kontena/git/refs{/sha}","trees_url":"https://api.github.com/repos/kontena/kontena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kontena/kontena/statuses/{sha}","languages_url":"https://api.github.com/repos/kontena/kontena/languages","stargazers_url":"https://api.github.com/repos/kontena/kontena/stargazers","contributors_url":"https://api.github.com/repos/kontena/kontena/contributors","subscribers_url":"https://api.github.com/repos/kontena/kontena/subscribers","subscription_url":"https://api.github.com/repos/kontena/kontena/subscription","commits_url":"https://api.github.com/repos/kontena/kontena/commits{/sha}","git_commits_url":"https://api.github.com/repos/kontena/kontena/git/commits{/sha}","comments_url":"https://api.github.com/repos/kontena/kontena/comments{/number}","issue_comment_url":"https://api.github.com/repos/kontena/kontena/issues/comments{/number}","contents_url":"https://api.github.com/repos/kontena/kontena/contents/{+path}","compare_url":"https://api.github.com/repos/kontena/kontena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kontena/kontena/merges","archive_url":"https://api.github.com/repos/kontena/kontena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kontena/kontena/downloads","issues_url":"https://api.github.com/repos/kontena/kontena/issues{/number}","pulls_url":"https://api.github.com/repos/kontena/kontena/pulls{/number}","milestones_url":"https://api.github.com/repos/kontena/kontena/milestones{/number}","notifications_url":"https://api.github.com/repos/kontena/kontena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kontena/kontena/labels{/name}","releases_url":"https://api.github.com/repos/kontena/kontena/releases{/id}","deployments_url":"https://api.github.com/repos/kontena/kontena/deployments","created_at":"2015-03-22T18:52:32Z","updated_at":"2016-11-25T21:34:45Z","pushed_at":"2016-11-28T20:42:43Z","git_url":"git://github.com/kontena/kontena.git","ssh_url":"git@github.com:kontena/kontena.git","clone_url":"https://github.com/kontena/kontena.git","svn_url":"https://github.com/kontena/kontena","homepage":"http://www.kontena.io","size":5291,"stargazers_count":854,"watchers_count":854,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":152,"forks":80,"open_issues":152,"watchers":854,"default_branch":"master"}},"base":{"label":"kontena:master","ref":"master","sha":"10b79623ae66bd54f0d66035c4c09cbac2af76b7","user":{"login":"kontena","id":10419574,"avatar_url":"https://avatars.githubusercontent.com/u/10419574?v=3","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"repo":{"id":32689932,"name":"kontena","full_name":"kontena/kontena","owner":{"login":"kontena","id":10419574,"avatar_url":"https://avatars.githubusercontent.com/u/10419574?v=3","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kontena/kontena","description":"The developer friendly container and micro services platform. Works on any cloud, easy to setup, simple to use.","fork":false,"url":"https://api.github.com/repos/kontena/kontena","forks_url":"https://api.github.com/repos/kontena/kontena/forks","keys_url":"https://api.github.com/repos/kontena/kontena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kontena/kontena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kontena/kontena/teams","hooks_url":"https://api.github.com/repos/kontena/kontena/hooks","issue_events_url":"https://api.github.com/repos/kontena/kontena/issues/events{/number}","events_url":"https://api.github.com/repos/kontena/kontena/events","assignees_url":"https://api.github.com/repos/kontena/kontena/assignees{/user}","branches_url":"https://api.github.com/repos/kontena/kontena/branches{/branch}","tags_url":"https://api.github.com/repos/kontena/kontena/tags","blobs_url":"https://api.github.com/repos/kontena/kontena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kontena/kontena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kontena/kontena/git/refs{/sha}","trees_url":"https://api.github.com/repos/kontena/kontena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kontena/kontena/statuses/{sha}","languages_url":"https://api.github.com/repos/kontena/kontena/languages","stargazers_url":"https://api.github.com/repos/kontena/kontena/stargazers","contributors_url":"https://api.github.com/repos/kontena/kontena/contributors","subscribers_url":"https://api.github.com/repos/kontena/kontena/subscribers","subscription_url":"https://api.github.com/repos/kontena/kontena/subscription","commits_url":"https://api.github.com/repos/kontena/kontena/commits{/sha}","git_commits_url":"https://api.github.com/repos/kontena/kontena/git/commits{/sha}","comments_url":"https://api.github.com/repos/kontena/kontena/comments{/number}","issue_comment_url":"https://api.github.com/repos/kontena/kontena/issues/comments{/number}","contents_url":"https://api.github.com/repos/kontena/kontena/contents/{+path}","compare_url":"https://api.github.com/repos/kontena/kontena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kontena/kontena/merges","archive_url":"https://api.github.com/repos/kontena/kontena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kontena/kontena/downloads","issues_url":"https://api.github.com/repos/kontena/kontena/issues{/number}","pulls_url":"https://api.github.com/repos/kontena/kontena/pulls{/number}","milestones_url":"https://api.github.com/repos/kontena/kontena/milestones{/number}","notifications_url":"https://api.github.com/repos/kontena/kontena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kontena/kontena/labels{/name}","releases_url":"https://api.github.com/repos/kontena/kontena/releases{/id}","deployments_url":"https://api.github.com/repos/kontena/kontena/deployments","created_at":"2015-03-22T18:52:32Z","updated_at":"2016-11-25T21:34:45Z","pushed_at":"2016-11-28T20:42:43Z","git_url":"git://github.com/kontena/kontena.git","ssh_url":"git@github.com:kontena/kontena.git","clone_url":"https://github.com/kontena/kontena.git","svn_url":"https://github.com/kontena/kontena","homepage":"http://www.kontena.io","size":5291,"stargazers_count":854,"watchers_count":854,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":152,"forks":80,"open_issues":152,"watchers":854,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kontena/kontena/pulls/1403"},"html":{"href":"https://github.com/kontena/kontena/pull/1403"},"issue":{"href":"https://api.github.com/repos/kontena/kontena/issues/1403"},"comments":{"href":"https://api.github.com/repos/kontena/kontena/issues/1403/comments"},"review_comments":{"href":"https://api.github.com/repos/kontena/kontena/pulls/1403/comments"},"review_comment":{"href":"https://api.github.com/repos/kontena/kontena/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kontena/kontena/pulls/1403/commits"},"statuses":{"href":"https://api.github.com/repos/kontena/kontena/statuses/1b907f8645d4de88169958ad61f2d5652b858d0f"}}}}
{"actor":{"display_login":"kke"}}