{"action":"created","issue":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4699","repository_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4699/labels{/name}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4699/comments","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4699/events","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4699","id":158662043,"number":4699,"title":"slack notification (rebased onto develop)","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-06-06T12:05:27Z","updated_at":"2016-06-08T12:30:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4699","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4699","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4699.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4699.patch"},"body":"This is the same as gh-4698 but rebased onto develop.\r\n\r\n----\r\n\r\nThis 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 test:\r\n  - https://cowfish.openmicroscopy.org/webmerge/weberror/error_404/\r\n  - https://cowfish.openmicroscopy.org/webmerge/weberror/error_500/\r\n- check email errors accordingly\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\r\n\r\n                "},"comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments/224574311","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4699#issuecomment-224574311","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4699","id":224574311,"user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T12:30:21Z","updated_at":"2016-06-08T12:30:21Z","body":"Looking at https://github.com/openmicroscopy/openmicroscopy/pull/4699/files#diff-7e3491c8f527592430b6decfcdc7c4d3R1098 for example, I do wonder if we're not making the hard-coding problem again. I.e. would a tuple of values all under `omero.notify` be more flexible. That being said, I don't know how the Java servers would/will make use of this."}}
{"actor":{"display_login":"joshmoore"}}