{"action":"created","issue":{"url":"https://api.github.com/repos/progrium/pluginhook/issues/14","labels_url":"https://api.github.com/repos/progrium/pluginhook/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/progrium/pluginhook/issues/14/comments","events_url":"https://api.github.com/repos/progrium/pluginhook/issues/14/events","html_url":"https://github.com/progrium/pluginhook/pull/14","id":71841739,"number":14,"title":"export `PLUGINHOOK_COMMAND_COUNT`","user":{"login":"mlebkowski","id":848731,"avatar_url":"https://avatars.githubusercontent.com/u/848731?v=3","gravatar_id":"","url":"https://api.github.com/users/mlebkowski","html_url":"https://github.com/mlebkowski","followers_url":"https://api.github.com/users/mlebkowski/followers","following_url":"https://api.github.com/users/mlebkowski/following{/other_user}","gists_url":"https://api.github.com/users/mlebkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/mlebkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlebkowski/subscriptions","organizations_url":"https://api.github.com/users/mlebkowski/orgs","repos_url":"https://api.github.com/users/mlebkowski/repos","events_url":"https://api.github.com/users/mlebkowski/events{/privacy}","received_events_url":"https://api.github.com/users/mlebkowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-29T10:42:35Z","updated_at":"2015-04-29T12:42:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/progrium/pluginhook/pulls/14","html_url":"https://github.com/progrium/pluginhook/pull/14","diff_url":"https://github.com/progrium/pluginhook/pull/14.diff","patch_url":"https://github.com/progrium/pluginhook/pull/14.patch"},"body":"I have no experience in Go, but this patch seems simple enough not to break anything ;)\r\n\r\nThis way we could have a default behaviour if no plugin handles the event, ref: https://github.com/progrium/dokku/pull/1149\r\n\r\n```bash\r\npluginhook some-obscure-event $params\r\nif [[ \"$PLUGINHOOK_COMMAND_COUNT\" -eq 0 ]]; then\r\n  echo \"No plugin handles the obscire-event, bailing out\" >&2\r\n  exit 1\r\nfi \r\n```"},"comment":{"url":"https://api.github.com/repos/progrium/pluginhook/issues/comments/97415040","html_url":"https://github.com/progrium/pluginhook/pull/14#issuecomment-97415040","issue_url":"https://api.github.com/repos/progrium/pluginhook/issues/14","id":97415040,"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},"created_at":"2015-04-29T12:42:39Z","updated_at":"2015-04-29T12:42:39Z","body":"I'd add this as a requirement to progrium/plugn, and then for now in Dokku,\ncreate a function that checks if there are handler hooks. Then you can run\nthat and use that for the conditional that would then use pluginhook if\nthere are any.\n"}}