{"action":"created","issue":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4698","repository_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4698/labels{/name}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4698/comments","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4698/events","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4698","id":158659032,"number":4698,"title":"slack notification","user":{"login":"aleksandra-tarkowska","id":1065155,"avatar_url":"https://avatars.githubusercontent.com/u/1065155?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksandra-tarkowska","html_url":"https://github.com/aleksandra-tarkowska","followers_url":"https://api.github.com/users/aleksandra-tarkowska/followers","following_url":"https://api.github.com/users/aleksandra-tarkowska/following{/other_user}","gists_url":"https://api.github.com/users/aleksandra-tarkowska/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksandra-tarkowska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksandra-tarkowska/subscriptions","organizations_url":"https://api.github.com/users/aleksandra-tarkowska/orgs","repos_url":"https://api.github.com/users/aleksandra-tarkowska/repos","events_url":"https://api.github.com/users/aleksandra-tarkowska/events{/privacy}","received_events_url":"https://api.github.com/users/aleksandra-tarkowska/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels/metadata52","name":"metadata52","color":"069970"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-06T11:45:37Z","updated_at":"2016-07-04T09:28:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4698","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4698","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4698.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4698.patch"},"body":"This PR allows to set up custom notification using slack using http://django-slack.readthedocs.io/\r\n\r\nTo test:\r\n\r\n- `pip install django_slack`\r\n- generate your token https://api.slack.com/web#authentication\r\n- set up config:\r\n\r\n ```\r\n bin/omero config set omero.web.debug false\r\n bin/omero config set omero.slack.enabled true\r\n bin/omero config set omero.slack.token \"xoxp-123token...\"\r\n bin/omero config set omero.slack.channel \"#logs\"\r\n bin/omero config set omero.slack.username \"abc\"\r\n ```\r\n- add weberror app for testing\r\n- start web and enjoy slack :)\r\n\r\n\r\nAdditional testing: I also cleaned up email notification\r\n-  set the following:\r\n\r\n ```\r\nbin/omero config set omero.web.debug False\r\nbin/omero config set omero.mail.config true\r\n```\r\n *mail config is not named `enabled` but `config` because property name is matching server side property*\r\n\r\n- add weberror app for testing\r\n- set mail config https://www.openmicroscopy.org/site/support/omero5.2/sysadmins/mail.html or use local SMTP mock (you will not get real email, just console output):\r\n    - set ```bin/omero config set omero.mail.from \"your@email``` and ```bin/omero config set omero.mail.host \"localhost\"```\r\n    - run in new console SMTP mock ```sudo python -m smtpd -n -c DebuggingServer localhost:25```. *Email message will be shown as a plane text on your console.*\r\n- set your email in ```bin/omero config set omero.web.admins '[[\"Username\", \"your@email\"]]'```\r\n- try to get HTTP500 and 404 (must come from broken link in template, do not access random url) and see if you received both errors by email"},"comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments/230246864","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4698#issuecomment-230246864","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4698","id":230246864,"user":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T09:28:08Z","updated_at":"2016-07-04T09:28:08Z","body":"What's the plan for this? Merge and deploy at the next IDR release?"}}
{"actor":{"display_login":"manics"}}