{"action":"created","issue":{"url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/187","repository_url":"https://api.github.com/repos/geopython/GeoHealthCheck","labels_url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/187/comments","events_url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/187/events","html_url":"https://github.com/geopython/GeoHealthCheck/pull/187","id":297200284,"number":187,"title":"per-resource notifications #15","user":{"login":"cezio","id":116021,"avatar_url":"https://avatars2.githubusercontent.com/u/116021?v=4","gravatar_id":"","url":"https://api.github.com/users/cezio","html_url":"https://github.com/cezio","followers_url":"https://api.github.com/users/cezio/followers","following_url":"https://api.github.com/users/cezio/following{/other_user}","gists_url":"https://api.github.com/users/cezio/gists{/gist_id}","starred_url":"https://api.github.com/users/cezio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezio/subscriptions","organizations_url":"https://api.github.com/users/cezio/orgs","repos_url":"https://api.github.com/users/cezio/repos","events_url":"https://api.github.com/users/cezio/events{/privacy}","received_events_url":"https://api.github.com/users/cezio/received_events","type":"User","site_admin":false},"labels":[{"id":128154107,"url":"https://api.github.com/repos/geopython/GeoHealthCheck/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"cezio","id":116021,"avatar_url":"https://avatars2.githubusercontent.com/u/116021?v=4","gravatar_id":"","url":"https://api.github.com/users/cezio","html_url":"https://github.com/cezio","followers_url":"https://api.github.com/users/cezio/followers","following_url":"https://api.github.com/users/cezio/following{/other_user}","gists_url":"https://api.github.com/users/cezio/gists{/gist_id}","starred_url":"https://api.github.com/users/cezio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezio/subscriptions","organizations_url":"https://api.github.com/users/cezio/orgs","repos_url":"https://api.github.com/users/cezio/repos","events_url":"https://api.github.com/users/cezio/events{/privacy}","received_events_url":"https://api.github.com/users/cezio/received_events","type":"User","site_admin":false},"assignees":[{"login":"cezio","id":116021,"avatar_url":"https://avatars2.githubusercontent.com/u/116021?v=4","gravatar_id":"","url":"https://api.github.com/users/cezio","html_url":"https://github.com/cezio","followers_url":"https://api.github.com/users/cezio/followers","following_url":"https://api.github.com/users/cezio/following{/other_user}","gists_url":"https://api.github.com/users/cezio/gists{/gist_id}","starred_url":"https://api.github.com/users/cezio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezio/subscriptions","organizations_url":"https://api.github.com/users/cezio/orgs","repos_url":"https://api.github.com/users/cezio/repos","events_url":"https://api.github.com/users/cezio/events{/privacy}","received_events_url":"https://api.github.com/users/cezio/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/geopython/GeoHealthCheck/milestones/4","html_url":"https://github.com/geopython/GeoHealthCheck/milestone/4","labels_url":"https://api.github.com/repos/geopython/GeoHealthCheck/milestones/4/labels","id":2663419,"number":4,"title":"Version 0.4.0","description":"Issues for version 0.4.0","creator":{"login":"justb4","id":582630,"avatar_url":"https://avatars2.githubusercontent.com/u/582630?v=4","gravatar_id":"","url":"https://api.github.com/users/justb4","html_url":"https://github.com/justb4","followers_url":"https://api.github.com/users/justb4/followers","following_url":"https://api.github.com/users/justb4/following{/other_user}","gists_url":"https://api.github.com/users/justb4/gists{/gist_id}","starred_url":"https://api.github.com/users/justb4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justb4/subscriptions","organizations_url":"https://api.github.com/users/justb4/orgs","repos_url":"https://api.github.com/users/justb4/repos","events_url":"https://api.github.com/users/justb4/events{/privacy}","received_events_url":"https://api.github.com/users/justb4/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":3,"state":"open","created_at":"2017-07-26T16:09:10Z","updated_at":"2018-03-05T11:19:38Z","due_on":"2018-03-09T08:00:00Z","closed_at":null},"comments":9,"created_at":"2018-02-14T18:33:26Z","updated_at":"2018-03-05T13:11:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/geopython/GeoHealthCheck/pulls/187","html_url":"https://github.com/geopython/GeoHealthCheck/pull/187","diff_url":"https://github.com/geopython/GeoHealthCheck/pull/187.diff","patch_url":"https://github.com/geopython/GeoHealthCheck/pull/187.patch"},"body":"partial fix #15 \r\n\r\nThis patch adds per-resource notifications. Notifications have separate `Recipient` model, which is m2m (through `ResourceNotification`) with `Resource` model.\r\n\r\n`Recipient` contains two main fields:\r\n * `channel` - medium type (for now `email` only)\r\n * `location` - value that identifies recipient for given channel. value passed to `location` will be validated when new instance is created.\r\n `Recipient` model is not related to any user, so resource's owner can set arbitrary email (or any other recipient) to receive notifications. Recipient doesn't have to be GHC user to get notifications (or can be non-human, like slack bot).\r\n\r\nEach time `Resource`'s recipients are modified, unused `Recipient`s are removed.\r\n\r\nIn UI, recipients are added with input field (for email), with autocomplete, which suggests from values added for resources owned by current user.\r\n\r\nI've included test for model api, and support for recipients in data export.\r\n\r\nOther changes, improvements to code base:\r\n* included `wtforms` in requirements\r\n* migrations are regular packages now (added `__init__.py`)\r\n* replaced import hack for `alembic_helpers` in migrations with regular import\r\n* included jqueryui/autocomplete (js + css) to static files\r\n* added translations to repo (they are pretty static, no need to generate them for deployment)"},"comment":{"url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/comments/370414469","html_url":"https://github.com/geopython/GeoHealthCheck/pull/187#issuecomment-370414469","issue_url":"https://api.github.com/repos/geopython/GeoHealthCheck/issues/187","id":370414469,"user":{"login":"cezio","id":116021,"avatar_url":"https://avatars2.githubusercontent.com/u/116021?v=4","gravatar_id":"","url":"https://api.github.com/users/cezio","html_url":"https://github.com/cezio","followers_url":"https://api.github.com/users/cezio/followers","following_url":"https://api.github.com/users/cezio/following{/other_user}","gists_url":"https://api.github.com/users/cezio/gists{/gist_id}","starred_url":"https://api.github.com/users/cezio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezio/subscriptions","organizations_url":"https://api.github.com/users/cezio/orgs","repos_url":"https://api.github.com/users/cezio/repos","events_url":"https://api.github.com/users/cezio/events{/privacy}","received_events_url":"https://api.github.com/users/cezio/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T13:11:53Z","updated_at":"2018-03-05T13:11:53Z","author_association":"CONTRIBUTOR","body":"> see above: 'webhook' should be in Enum definition in bb91fb332c36.py\r\n\r\n Right. I was checking with sqlite only. I knew that PG supports enums, but didn't know about that subtle difference in SA. Should be fixed.\r\n\r\n> edit a Resource. Click 'Save' without filling in email, always error: Save: ('Bad value: Invalid email address.', ValidationError(u'Invalid email address.',)) Looks like at least one email is always required. Especially existing installations may require only the global notification email.\r\n\r\n Should be fixed. \r\n\r\n> not clear how to separate email addresses in Resource Edit form (comma-separated), give suggestion text.\r\n\r\n I've added label to template, updated docs and translations.\r\n\r\n>  specifying multiple webhooks in Resource Edit form: only first webhook is stored and notified.\r\n\r\nI couldn't reproduce this. Did you add subsequent webhooks with `+`? I've added green/red colors to those widgets, as they may be hard to notice."}}
{"actor":{"display_login":"cezio"}}