{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/contrib/issues/1727","repository_url":"https://api.github.com/repos/kubernetes/contrib","labels_url":"https://api.github.com/repos/kubernetes/contrib/issues/1727/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/contrib/issues/1727/comments","events_url":"https://api.github.com/repos/kubernetes/contrib/issues/1727/events","html_url":"https://github.com/kubernetes/contrib/pull/1727","id":176153423,"number":1727,"title":"implement approval handler","user":{"login":"hongchaodeng","id":920884,"avatar_url":"https://avatars.githubusercontent.com/u/920884?v=3","gravatar_id":"","url":"https://api.github.com/users/hongchaodeng","html_url":"https://github.com/hongchaodeng","followers_url":"https://api.github.com/users/hongchaodeng/followers","following_url":"https://api.github.com/users/hongchaodeng/following{/other_user}","gists_url":"https://api.github.com/users/hongchaodeng/gists{/gist_id}","starred_url":"https://api.github.com/users/hongchaodeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hongchaodeng/subscriptions","organizations_url":"https://api.github.com/users/hongchaodeng/orgs","repos_url":"https://api.github.com/users/hongchaodeng/repos","events_url":"https://api.github.com/users/hongchaodeng/events{/privacy}","received_events_url":"https://api.github.com/users/hongchaodeng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/contrib/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/contrib/labels/lgtm","name":"lgtm","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false},"assignees":[{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false},{"login":"apelisse","id":1929644,"avatar_url":"https://avatars.githubusercontent.com/u/1929644?v=3","gravatar_id":"","url":"https://api.github.com/users/apelisse","html_url":"https://github.com/apelisse","followers_url":"https://api.github.com/users/apelisse/followers","following_url":"https://api.github.com/users/apelisse/following{/other_user}","gists_url":"https://api.github.com/users/apelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/apelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apelisse/subscriptions","organizations_url":"https://api.github.com/users/apelisse/orgs","repos_url":"https://api.github.com/users/apelisse/repos","events_url":"https://api.github.com/users/apelisse/events{/privacy}","received_events_url":"https://api.github.com/users/apelisse/received_events","type":"User","site_admin":false},{"login":"grodrigues3","id":4854198,"avatar_url":"https://avatars.githubusercontent.com/u/4854198?v=3","gravatar_id":"","url":"https://api.github.com/users/grodrigues3","html_url":"https://github.com/grodrigues3","followers_url":"https://api.github.com/users/grodrigues3/followers","following_url":"https://api.github.com/users/grodrigues3/following{/other_user}","gists_url":"https://api.github.com/users/grodrigues3/gists{/gist_id}","starred_url":"https://api.github.com/users/grodrigues3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grodrigues3/subscriptions","organizations_url":"https://api.github.com/users/grodrigues3/orgs","repos_url":"https://api.github.com/users/grodrigues3/repos","events_url":"https://api.github.com/users/grodrigues3/events{/privacy}","received_events_url":"https://api.github.com/users/grodrigues3/received_events","type":"User","site_admin":false},{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-09-10T03:25:05Z","updated_at":"2016-09-15T22:29:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/1727","html_url":"https://github.com/kubernetes/contrib/pull/1727","diff_url":"https://github.com/kubernetes/contrib/pull/1727.diff","patch_url":"https://github.com/kubernetes/contrib/pull/1727.patch"},"body":"ref: https://github.com/kubernetes/contrib/issues/1389\r\n\r\nWhat?\r\nThis PR adds ApprovalHandler that will try to add \"approved\" label once all files of change has been approved by approvers.\r\n\r\n```\r\n// The algorithm goes as:\r\n// - Initially, we set up approverMap\r\n//   - Go through all comments after latest commit. If any approver said \"/approve\", add him to approverMap.\r\n// - For each file, we see if any approver of this file is in approverMap.\r\n//   - An approver of a file is defined as:\r\n//     - It's known that each dir has a list of approvers. (This might not hold true. For usability, current situation is enough.)\r\n//     - Approver of a dir is also the approver of child dirs.\r\n//   - We look at only top 3 dir level's approvers .\r\n// - Iff all files has been approved, the bot will add \"approved\" label.\r\n```\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/contrib/1727)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/contrib/issues/comments/247473199","html_url":"https://github.com/kubernetes/contrib/pull/1727#issuecomment-247473199","issue_url":"https://api.github.com/repos/kubernetes/contrib/issues/1727","id":247473199,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T22:29:29Z","updated_at":"2016-09-15T22:29:29Z","body":"Automatic merge from submit-queue"}}
{"actor":{"display_login":"k8s-merge-robot"}}