{"action":"created","issue":{"url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/1106","repository_url":"https://api.github.com/repos/screwdriver-cd/screwdriver","labels_url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/1106/labels{/name}","comments_url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/1106/comments","events_url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/1106/events","html_url":"https://github.com/screwdriver-cd/screwdriver/pull/1106","id":329681697,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyODc5MzUz","number":1106,"title":"fix(854) [2]: Add endpoints to update admins","user":{"login":"yoshwata","id":32473622,"node_id":"MDQ6VXNlcjMyNDczNjIy","avatar_url":"https://avatars0.githubusercontent.com/u/32473622?v=4","gravatar_id":"","url":"https://api.github.com/users/yoshwata","html_url":"https://github.com/yoshwata","followers_url":"https://api.github.com/users/yoshwata/followers","following_url":"https://api.github.com/users/yoshwata/following{/other_user}","gists_url":"https://api.github.com/users/yoshwata/gists{/gist_id}","starred_url":"https://api.github.com/users/yoshwata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoshwata/subscriptions","organizations_url":"https://api.github.com/users/yoshwata/orgs","repos_url":"https://api.github.com/users/yoshwata/repos","events_url":"https://api.github.com/users/yoshwata/events{/privacy}","received_events_url":"https://api.github.com/users/yoshwata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-06T01:47:54Z","updated_at":"2018-06-07T05:41:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/screwdriver/pulls/1106","html_url":"https://github.com/screwdriver-cd/screwdriver/pull/1106","diff_url":"https://github.com/screwdriver-cd/screwdriver/pull/1106.diff","patch_url":"https://github.com/screwdriver-cd/screwdriver/pull/1106.patch"},"body":"## Context\r\n\r\n<!-- Why do we need this PR? What was the reason that led you to make this change? -->\r\nThis pr fixes the issue [854](https://github.com/screwdriver-cd/screwdriver/issues/854)\r\n\r\n## Objective\r\n\r\n<!-- What does this PR fix? What intentional changes will this PR make? -->\r\nThe pr https://github.com/screwdriver-cd/screwdriver/pull/1061 added the code to update `admins` table at `build/create` endpoint, but it is few case to use `build/create` endpoint. `event/create` and `build/sync` point is usually used so I add the code to update `admins` in this pr.\r\n\r\nI confirmed locally that it works like below.\r\n\r\n### before build\r\nThe admins other than yoshwata has no permission to push.\r\n![picture1](https://user-images.githubusercontent.com/32473622/41077394-569e7360-6a51-11e8-8af8-0c6307f57764.png)\r\n\r\n### after build\r\n![picture2](https://user-images.githubusercontent.com/32473622/41077411-69deb7fa-6a51-11e8-9673-791d80477e39.png)\r\n\r\n## References\r\n\r\n<!-- Links or resources that help clarify and support your intentions (e.g., Github issue) -->\r\nhttps://github.com/screwdriver-cd/screwdriver/pull/1061#issuecomment-393604535\r\n\r\n## Related PRs\r\nhttps://github.com/screwdriver-cd/models/pull/260\r\nhttps://github.com/screwdriver-cd/screwdriver/pull/1106"},"comment":{"url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/comments/395299657","html_url":"https://github.com/screwdriver-cd/screwdriver/pull/1106#issuecomment-395299657","issue_url":"https://api.github.com/repos/screwdriver-cd/screwdriver/issues/1106","id":395299657,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTI5OTY1Nw==","user":{"login":"yoshwata","id":32473622,"node_id":"MDQ6VXNlcjMyNDczNjIy","avatar_url":"https://avatars0.githubusercontent.com/u/32473622?v=4","gravatar_id":"","url":"https://api.github.com/users/yoshwata","html_url":"https://github.com/yoshwata","followers_url":"https://api.github.com/users/yoshwata/followers","following_url":"https://api.github.com/users/yoshwata/following{/other_user}","gists_url":"https://api.github.com/users/yoshwata/gists{/gist_id}","starred_url":"https://api.github.com/users/yoshwata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoshwata/subscriptions","organizations_url":"https://api.github.com/users/yoshwata/orgs","repos_url":"https://api.github.com/users/yoshwata/repos","events_url":"https://api.github.com/users/yoshwata/events{/privacy}","received_events_url":"https://api.github.com/users/yoshwata/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T05:41:52Z","updated_at":"2018-06-07T05:41:52Z","author_association":"CONTRIBUTOR","body":"What I concerning about this PR is the case that admin who starts periodic build is removed. I think the user kicking periodic build is a special user for the periodic build, so I think that is not become a problem."}}
{"actor":{"display_login":"yoshwata"}}