{"action":"created","issue":{"url":"https://api.github.com/repos/progrium/dokku/issues/592","labels_url":"https://api.github.com/repos/progrium/dokku/issues/592/labels{/name}","comments_url":"https://api.github.com/repos/progrium/dokku/issues/592/comments","events_url":"https://api.github.com/repos/progrium/dokku/issues/592/events","html_url":"https://github.com/progrium/dokku/pull/592","id":34453675,"number":592,"title":"Refactor core into plugins with command and subcommand scripts","user":{"login":"stuartpb","id":572196,"avatar_url":"https://avatars.githubusercontent.com/u/572196?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartpb","html_url":"https://github.com/stuartpb","followers_url":"https://api.github.com/users/stuartpb/followers","following_url":"https://api.github.com/users/stuartpb/following{/other_user}","gists_url":"https://api.github.com/users/stuartpb/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpb/subscriptions","organizations_url":"https://api.github.com/users/stuartpb/orgs","repos_url":"https://api.github.com/users/stuartpb/repos","events_url":"https://api.github.com/users/stuartpb/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-05-28T10:26:25Z","updated_at":"2015-02-19T17:55:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/progrium/dokku/pulls/592","html_url":"https://github.com/progrium/dokku/pull/592","diff_url":"https://github.com/progrium/dokku/pull/592.diff","patch_url":"https://github.com/progrium/dokku/pull/592.patch"},"body":"This change makes the mapping of plugins to commands in Dokku significantly more consistent, giving each existing Dokku command its own plugin, and each plugin a dedicated location for a provided command and/or subcommands.\r\n\r\nBeyond the navigational advantages, this allows individual commands / components of Dokku to be disabled or overridden at the plugin level, without having to muck around patching scripts that provide unrelated commands.\r\n\r\n## Commands and subcommands\r\n\r\n\"command\" scripts, like a hook, are executed when the name of a plugin is\r\ncalled: for instance, \"dokku build\" calls the \"build\" plugin's \"command\"\r\nscript (plugins/build/command).\r\n\r\n\"subcommand\" scripts are called for subcommands of plugins, as namespaced with\r\na colon: for example, \"dokku backup:export\" calls the \"export\" subcommand\r\nscript of the \"backup\" plugin (plugins/backup/subcommands/export).\r\n\r\nPlugins that do not use their name for commands/subcommands (such as the git plugin, or plugins that wrap other commands) can continue to use the \"commands\" hook, which remains fully supported and backward-compatible.\r\n\r\n## Updates to documentation\r\n\r\nEach plugin / command gets a README describing its purpose and implementation.\r\n\r\nAdditionally, the \"help\" text describing its commands' usage is moved out to a separate \"help.txt\" file, which is then read and (potentially) columnized when running the \"help\" command.\r\n\r\nThis commit also removes the \"warning\" in the plugins directory - Dokku's stability, hooks and all, is\r\ncovered by the main Dokku README.\r\n\r\n## Miscellany\r\n\r\nThis commit also removes the nginx-vhosts plugin's functionally-empty \"commands\" hook script, for clarity and cleanliness.\r\n\r\n(This is effectively a resubmission of #458, as it was remade after taking #312 into account, squashed and rebased onto the current master.)"},"comment":{"url":"https://api.github.com/repos/progrium/dokku/issues/comments/75101654","html_url":"https://github.com/progrium/dokku/pull/592#issuecomment-75101654","issue_url":"https://api.github.com/repos/progrium/dokku/issues/592","id":75101654,"user":{"login":"michaelshobbs","id":4491438,"avatar_url":"https://avatars.githubusercontent.com/u/4491438?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelshobbs","html_url":"https://github.com/michaelshobbs","followers_url":"https://api.github.com/users/michaelshobbs/followers","following_url":"https://api.github.com/users/michaelshobbs/following{/other_user}","gists_url":"https://api.github.com/users/michaelshobbs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelshobbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelshobbs/subscriptions","organizations_url":"https://api.github.com/users/michaelshobbs/orgs","repos_url":"https://api.github.com/users/michaelshobbs/repos","events_url":"https://api.github.com/users/michaelshobbs/events{/privacy}","received_events_url":"https://api.github.com/users/michaelshobbs/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T17:55:30Z","updated_at":"2015-02-19T17:55:30Z","body":"Yeah I think we can/should use this pattern. I can take a swing at it. Let's leave this open for now."}}