{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-releng/services/issues/1166","repository_url":"https://api.github.com/repos/mozilla-releng/services","labels_url":"https://api.github.com/repos/mozilla-releng/services/issues/1166/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-releng/services/issues/1166/comments","events_url":"https://api.github.com/repos/mozilla-releng/services/issues/1166/events","html_url":"https://github.com/mozilla-releng/services/issues/1166","id":323287607,"node_id":"MDU6SXNzdWUzMjMyODc2MDc=","number":1166,"title":"shipit_static_analysis: Enable Phabricator reviews in production","user":{"login":"jankeromnes","id":599268,"node_id":"MDQ6VXNlcjU5OTI2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/599268?v=4","gravatar_id":"","url":"https://api.github.com/users/jankeromnes","html_url":"https://github.com/jankeromnes","followers_url":"https://api.github.com/users/jankeromnes/followers","following_url":"https://api.github.com/users/jankeromnes/following{/other_user}","gists_url":"https://api.github.com/users/jankeromnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jankeromnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jankeromnes/subscriptions","organizations_url":"https://api.github.com/users/jankeromnes/orgs","repos_url":"https://api.github.com/users/jankeromnes/repos","events_url":"https://api.github.com/users/jankeromnes/events{/privacy}","received_events_url":"https://api.github.com/users/jankeromnes/received_events","type":"User","site_admin":false},"labels":[{"id":608460070,"node_id":"MDU6TGFiZWw2MDg0NjAwNzA=","url":"https://api.github.com/repos/mozilla-releng/services/labels/app:shipit_static_analysis","name":"app:shipit_static_analysis","color":"fbca04","default":false},{"id":321740361,"node_id":"MDU6TGFiZWwzMjE3NDAzNjE=","url":"https://api.github.com/repos/mozilla-releng/services/labels/kind:enhancement","name":"kind:enhancement","color":"1d76db","default":false},{"id":801528503,"node_id":"MDU6TGFiZWw4MDE1Mjg1MDM=","url":"https://api.github.com/repos/mozilla-releng/services/labels/lang:python","name":"lang:python","color":"a9e7f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-05-15T16:13:17Z","updated_at":"2018-06-20T09:10:49Z","closed_at":null,"author_association":"COLLABORATOR","body":"Our automated review bot is able to analyze Phabricator code reviews.\r\n\r\nWe should evaluate its results on staging, and once satisfied we should enable it in production (and evaluate it there as well).\r\n\r\nTODO:\r\n\r\n- [x] Ensure that our bot detects new Phabricator code reviews (on staging and production)\r\n- [x] Ensure that our bot publishes automated reviews when it finds issues\r\n- [ ] Validate published reviews on staging (iterate if adjustments are needed)\r\n  - [x] Ensure that `clang-tidy` and `eslint` issues work as well\r\n- [ ] Enable in production\r\n- [ ] Confirm that published reviews still look good/valuable in production"},"comment":{"url":"https://api.github.com/repos/mozilla-releng/services/issues/comments/398680288","html_url":"https://github.com/mozilla-releng/services/issues/1166#issuecomment-398680288","issue_url":"https://api.github.com/repos/mozilla-releng/services/issues/1166","id":398680288,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODY4MDI4OA==","user":{"login":"La0","id":101004,"node_id":"MDQ6VXNlcjEwMTAwNA==","avatar_url":"https://avatars3.githubusercontent.com/u/101004?v=4","gravatar_id":"","url":"https://api.github.com/users/La0","html_url":"https://github.com/La0","followers_url":"https://api.github.com/users/La0/followers","following_url":"https://api.github.com/users/La0/following{/other_user}","gists_url":"https://api.github.com/users/La0/gists{/gist_id}","starred_url":"https://api.github.com/users/La0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/La0/subscriptions","organizations_url":"https://api.github.com/users/La0/orgs","repos_url":"https://api.github.com/users/La0/repos","events_url":"https://api.github.com/users/La0/events{/privacy}","received_events_url":"https://api.github.com/users/La0/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T09:10:49Z","updated_at":"2018-06-20T09:10:49Z","author_association":"COLLABORATOR","body":"The review summary is generated by Phabricator, we only push [the same comment](https://github.com/mozilla-releng/services/blob/master/src/shipit_static_analysis/shipit_static_analysis/report/base.py#L127) as on Mozreview, without any extra infos about issues.\r\n\r\nThe [differential.createcomment](https://phabricator-dev.allizom.org/conduit/method/differential.createcomment/) is used to publish these comments.\r\n\r\nI just looked at the Phabricator source code, and it seems we could [specify an action](https://github.com/phacility/phabricator/blob/master/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php#L61) based on the analysis result : \r\n\r\n* accept\r\n* reject\r\n* rethink\r\n* resign\r\n* request_review\r\n\r\nThe reques_review & reject seem interesting for our use case"}}
{"actor":{"display_login":"La0"}}