{"action":"created","comment":{"url":"https://api.github.com/repos/progrium/dokku/pulls/comments/39340477","id":39340477,"diff_hunk":"@@ -0,0 +1,41 @@\n+#!/usr/bin/env bash\n+set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x\n+source \"$PLUGIN_CORE_AVAILABLE_PATH/common/functions\"\n+\n+disable_plugin() {\n+  local PLUGIN=\"$1\"\n+  [[ -e $PLUGIN_CORE_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail \"Cannot disable a core plugin\"\n+  [[ ! -e $PLUGIN_ENABLED_PATH/$PLUGIN ]] && dokku_log_fail \"Plugin already disabled\"\n+  [[ ! -e $PLUGIN_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail \"Plugin does not exist\"\n+  plugn disable $PLUGIN\n+  dokku_log_info1_quiet \"Plugin $PLUGIN disabled\"\n+}\n+\n+enable_plugin() {\n+  local PLUGIN=\"$1\"\n+  [[ -e $PLUGIN_ENABLED_PATH/$PLUGIN ]] && dokku_log_fail \"Plugin already enabled\"\n+  [[ ! -e $PLUGIN_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail \"Plugin does not exist\"\n+  plugn enable $PLUGIN\n+  dokku_log_info1_quiet \"Plugin $PLUGIN enabled\"\n+}\n+\n+download_plugin() {\n+  local PLUGIN_GIT_URL=\"$1\"\n+  plugn install $PLUGIN_GIT_URL\n+}\n+\n+download_and_enable_plugin() {","path":"plugins/plugin/functions","position":27,"original_position":27,"commit_id":"a68cb90edec7e7ecd37f9201609e4ff325e12a94","original_commit_id":"a68cb90edec7e7ecd37f9201609e4ff325e12a94","user":{"login":"josegonzalez","id":65675,"avatar_url":"https://avatars.githubusercontent.com/u/65675?v=3","gravatar_id":"","url":"https://api.github.com/users/josegonzalez","html_url":"https://github.com/josegonzalez","followers_url":"https://api.github.com/users/josegonzalez/followers","following_url":"https://api.github.com/users/josegonzalez/following{/other_user}","gists_url":"https://api.github.com/users/josegonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/josegonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josegonzalez/subscriptions","organizations_url":"https://api.github.com/users/josegonzalez/orgs","repos_url":"https://api.github.com/users/josegonzalez/repos","events_url":"https://api.github.com/users/josegonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/josegonzalez/received_events","type":"User","site_admin":false},"body":"Should this support plugin versioning? Since it's git, basically anything tree-ish should work I think?","created_at":"2015-09-12T19:16:06Z","updated_at":"2015-09-12T19:16:06Z","html_url":"https://github.com/progrium/dokku/pull/1228#discussion_r39340477","pull_request_url":"https://api.github.com/repos/progrium/dokku/pulls/1228","_links":{"self":{"href":"https://api.github.com/repos/progrium/dokku/pulls/comments/39340477"},"html":{"href":"https://github.com/progrium/dokku/pull/1228#discussion_r39340477"},"pull_request":{"href":"https://api.github.com/repos/progrium/dokku/pulls/1228"}}},"pull_request":{"url":"https://api.github.com/repos/progrium/dokku/pulls/1228","id":37616295,"html_url":"https://github.com/progrium/dokku/pull/1228","diff_url":"https://github.com/progrium/dokku/pull/1228.diff","patch_url":"https://github.com/progrium/dokku/pull/1228.patch","issue_url":"https://api.github.com/repos/progrium/dokku/issues/1228","number":1228,"state":"open","locked":false,"title":"switching from pluginhook to plugn","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},"body":"This is an initial pass at implementing [plugn](https://github.com/progrium/plugn)\r\n\r\nTODOS\r\n- [x] setup plugn `PLUGIN_PATH`\r\n- [x] convert core dokku plugins to plugn format\r\n- [x] enable core dokku plugins\r\n- [x] convert `pluginhook` calls to `plugin trigger`\r\n- [x] update .deb builds @josegonzalez :smile:\r\n- [x] update documentation\r\n- [x] move plugins-* to plugin: namespace\r\n- [x] introduce core plugin management\r\n- [x] introduce DOKKU_API_VERSION\r\n```\r\nplugin:disable <name>                                              Disable an installed plugin (third-party only)\r\nplugin:enable <name>                                               Enable a previously disabled plugin\r\nplugin:install [--core|git-url]                                    Optionally download git-url & run install trigger for active plugins (or only core ones)\r\nplugin:install-dependencies [--core]                               Run install-dependencies trigger for active plugins (or only core ones)\r\nplugin                                                             Print active plugins\r\nplugin:uninstall <name>                                            Uninstall a plugin (third-party only)\r\nplugin:update [git-url]                                            Optionally download git-url & run update trigger for active plugins```","created_at":"2015-06-13T01:07:22Z","updated_at":"2015-09-12T19:16:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cb3f5f2d20a5ea6e83bb814316d5bc8a7d2d85e","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/progrium/dokku/pulls/1228/commits","review_comments_url":"https://api.github.com/repos/progrium/dokku/pulls/1228/comments","review_comment_url":"https://api.github.com/repos/progrium/dokku/pulls/comments{/number}","comments_url":"https://api.github.com/repos/progrium/dokku/issues/1228/comments","statuses_url":"https://api.github.com/repos/progrium/dokku/statuses/a68cb90edec7e7ecd37f9201609e4ff325e12a94","head":{"label":"progrium:mh-switch-to-plugn","ref":"mh-switch-to-plugn","sha":"a68cb90edec7e7ecd37f9201609e4ff325e12a94","user":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"repo":{"id":10567197,"name":"dokku","full_name":"progrium/dokku","owner":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/progrium/dokku","description":"Docker powered mini-Heroku in around 100 lines of Bash","fork":false,"url":"https://api.github.com/repos/progrium/dokku","forks_url":"https://api.github.com/repos/progrium/dokku/forks","keys_url":"https://api.github.com/repos/progrium/dokku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/progrium/dokku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/progrium/dokku/teams","hooks_url":"https://api.github.com/repos/progrium/dokku/hooks","issue_events_url":"https://api.github.com/repos/progrium/dokku/issues/events{/number}","events_url":"https://api.github.com/repos/progrium/dokku/events","assignees_url":"https://api.github.com/repos/progrium/dokku/assignees{/user}","branches_url":"https://api.github.com/repos/progrium/dokku/branches{/branch}","tags_url":"https://api.github.com/repos/progrium/dokku/tags","blobs_url":"https://api.github.com/repos/progrium/dokku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/progrium/dokku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/progrium/dokku/git/refs{/sha}","trees_url":"https://api.github.com/repos/progrium/dokku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/progrium/dokku/statuses/{sha}","languages_url":"https://api.github.com/repos/progrium/dokku/languages","stargazers_url":"https://api.github.com/repos/progrium/dokku/stargazers","contributors_url":"https://api.github.com/repos/progrium/dokku/contributors","subscribers_url":"https://api.github.com/repos/progrium/dokku/subscribers","subscription_url":"https://api.github.com/repos/progrium/dokku/subscription","commits_url":"https://api.github.com/repos/progrium/dokku/commits{/sha}","git_commits_url":"https://api.github.com/repos/progrium/dokku/git/commits{/sha}","comments_url":"https://api.github.com/repos/progrium/dokku/comments{/number}","issue_comment_url":"https://api.github.com/repos/progrium/dokku/issues/comments{/number}","contents_url":"https://api.github.com/repos/progrium/dokku/contents/{+path}","compare_url":"https://api.github.com/repos/progrium/dokku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/progrium/dokku/merges","archive_url":"https://api.github.com/repos/progrium/dokku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/progrium/dokku/downloads","issues_url":"https://api.github.com/repos/progrium/dokku/issues{/number}","pulls_url":"https://api.github.com/repos/progrium/dokku/pulls{/number}","milestones_url":"https://api.github.com/repos/progrium/dokku/milestones{/number}","notifications_url":"https://api.github.com/repos/progrium/dokku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/progrium/dokku/labels{/name}","releases_url":"https://api.github.com/repos/progrium/dokku/releases{/id}","created_at":"2013-06-08T10:26:57Z","updated_at":"2015-09-12T18:28:52Z","pushed_at":"2015-09-11T20:38:22Z","git_url":"git://github.com/progrium/dokku.git","ssh_url":"git@github.com:progrium/dokku.git","clone_url":"https://github.com/progrium/dokku.git","svn_url":"https://github.com/progrium/dokku","homepage":"http://progrium.viewdocs.io/dokku","size":7558,"stargazers_count":9978,"watchers_count":9978,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":834,"mirror_url":null,"open_issues_count":29,"forks":834,"open_issues":29,"watchers":9978,"default_branch":"master"}},"base":{"label":"progrium:master","ref":"master","sha":"51e8b540cc7f347d350608ded05a4cedef6ec8d8","user":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"repo":{"id":10567197,"name":"dokku","full_name":"progrium/dokku","owner":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/progrium/dokku","description":"Docker powered mini-Heroku in around 100 lines of Bash","fork":false,"url":"https://api.github.com/repos/progrium/dokku","forks_url":"https://api.github.com/repos/progrium/dokku/forks","keys_url":"https://api.github.com/repos/progrium/dokku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/progrium/dokku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/progrium/dokku/teams","hooks_url":"https://api.github.com/repos/progrium/dokku/hooks","issue_events_url":"https://api.github.com/repos/progrium/dokku/issues/events{/number}","events_url":"https://api.github.com/repos/progrium/dokku/events","assignees_url":"https://api.github.com/repos/progrium/dokku/assignees{/user}","branches_url":"https://api.github.com/repos/progrium/dokku/branches{/branch}","tags_url":"https://api.github.com/repos/progrium/dokku/tags","blobs_url":"https://api.github.com/repos/progrium/dokku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/progrium/dokku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/progrium/dokku/git/refs{/sha}","trees_url":"https://api.github.com/repos/progrium/dokku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/progrium/dokku/statuses/{sha}","languages_url":"https://api.github.com/repos/progrium/dokku/languages","stargazers_url":"https://api.github.com/repos/progrium/dokku/stargazers","contributors_url":"https://api.github.com/repos/progrium/dokku/contributors","subscribers_url":"https://api.github.com/repos/progrium/dokku/subscribers","subscription_url":"https://api.github.com/repos/progrium/dokku/subscription","commits_url":"https://api.github.com/repos/progrium/dokku/commits{/sha}","git_commits_url":"https://api.github.com/repos/progrium/dokku/git/commits{/sha}","comments_url":"https://api.github.com/repos/progrium/dokku/comments{/number}","issue_comment_url":"https://api.github.com/repos/progrium/dokku/issues/comments{/number}","contents_url":"https://api.github.com/repos/progrium/dokku/contents/{+path}","compare_url":"https://api.github.com/repos/progrium/dokku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/progrium/dokku/merges","archive_url":"https://api.github.com/repos/progrium/dokku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/progrium/dokku/downloads","issues_url":"https://api.github.com/repos/progrium/dokku/issues{/number}","pulls_url":"https://api.github.com/repos/progrium/dokku/pulls{/number}","milestones_url":"https://api.github.com/repos/progrium/dokku/milestones{/number}","notifications_url":"https://api.github.com/repos/progrium/dokku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/progrium/dokku/labels{/name}","releases_url":"https://api.github.com/repos/progrium/dokku/releases{/id}","created_at":"2013-06-08T10:26:57Z","updated_at":"2015-09-12T18:28:52Z","pushed_at":"2015-09-11T20:38:22Z","git_url":"git://github.com/progrium/dokku.git","ssh_url":"git@github.com:progrium/dokku.git","clone_url":"https://github.com/progrium/dokku.git","svn_url":"https://github.com/progrium/dokku","homepage":"http://progrium.viewdocs.io/dokku","size":7558,"stargazers_count":9978,"watchers_count":9978,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":834,"mirror_url":null,"open_issues_count":29,"forks":834,"open_issues":29,"watchers":9978,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/progrium/dokku/pulls/1228"},"html":{"href":"https://github.com/progrium/dokku/pull/1228"},"issue":{"href":"https://api.github.com/repos/progrium/dokku/issues/1228"},"comments":{"href":"https://api.github.com/repos/progrium/dokku/issues/1228/comments"},"review_comments":{"href":"https://api.github.com/repos/progrium/dokku/pulls/1228/comments"},"review_comment":{"href":"https://api.github.com/repos/progrium/dokku/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/progrium/dokku/pulls/1228/commits"},"statuses":{"href":"https://api.github.com/repos/progrium/dokku/statuses/a68cb90edec7e7ecd37f9201609e4ff325e12a94"}}}}