{"action":"created","issue":{"url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/14","repository_url":"https://api.github.com/repos/Liqwyd/Cyclid","labels_url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/14/comments","events_url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/14/events","html_url":"https://github.com/Liqwyd/Cyclid/issues/14","id":140404506,"number":14,"title":"Make plugin configs available to non-API plugins","user":{"login":"Vanders","id":3168484,"avatar_url":"https://avatars.githubusercontent.com/u/3168484?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanders","html_url":"https://github.com/Vanders","followers_url":"https://api.github.com/users/Vanders/followers","following_url":"https://api.github.com/users/Vanders/following{/other_user}","gists_url":"https://api.github.com/users/Vanders/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanders/subscriptions","organizations_url":"https://api.github.com/users/Vanders/orgs","repos_url":"https://api.github.com/users/Vanders/repos","events_url":"https://api.github.com/users/Vanders/events{/privacy}","received_events_url":"https://api.github.com/users/Vanders/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Liqwyd/Cyclid/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-12T18:12:12Z","updated_at":"2016-04-21T17:44:09Z","closed_at":"2016-04-21T17:44:09Z","body":"Right now the plugin config is only passed into the API plugin methods. Other plugins _could_ call their get_config method, but that requires having the organization instance.\r\n\r\nIt'd be useful to provide a wrapper that retrieved the current organization and called get_config, so that plugins can retrieve their configuration without having to deal with the internal details of Sinatra routes & ActiveRecord models."},"comment":{"url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/comments/213033464","html_url":"https://github.com/Liqwyd/Cyclid/issues/14#issuecomment-213033464","issue_url":"https://api.github.com/repos/Liqwyd/Cyclid/issues/14","id":213033464,"user":{"login":"Vanders","id":3168484,"avatar_url":"https://avatars.githubusercontent.com/u/3168484?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanders","html_url":"https://github.com/Vanders","followers_url":"https://api.github.com/users/Vanders/followers","following_url":"https://api.github.com/users/Vanders/following{/other_user}","gists_url":"https://api.github.com/users/Vanders/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanders/subscriptions","organizations_url":"https://api.github.com/users/Vanders/orgs","repos_url":"https://api.github.com/users/Vanders/repos","events_url":"https://api.github.com/users/Vanders/events{/privacy}","received_events_url":"https://api.github.com/users/Vanders/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T17:44:09Z","updated_at":"2016-04-21T17:44:09Z","body":"As I suspected, this was fairly easy: I just had to extend the get_config static method to allow the `org` argument to be a string, so that plugins can use it without having to access the Organization model directly. Then just extend the job context to include the organization name and it's easy.\r\n\r\nFixed in c57b1632a19b776fd670d8d4798d054a4c166c74 and implemented in the Slack notification plugin in 6bc903149045c2266b319d53332d1fd605826b36"}}