{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/14","repository_url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs","labels_url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/14/comments","events_url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/14/events","html_url":"https://github.com/FreeCodeCampGuam/FCCG-Cogs/issues/14","id":185370304,"number":14,"title":"Github Cog authentication -- who should authentication be performed as?","user":{"login":"centipeda","id":16915320,"avatar_url":"https://avatars.githubusercontent.com/u/16915320?v=3","gravatar_id":"","url":"https://api.github.com/users/centipeda","html_url":"https://github.com/centipeda","followers_url":"https://api.github.com/users/centipeda/followers","following_url":"https://api.github.com/users/centipeda/following{/other_user}","gists_url":"https://api.github.com/users/centipeda/gists{/gist_id}","starred_url":"https://api.github.com/users/centipeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centipeda/subscriptions","organizations_url":"https://api.github.com/users/centipeda/orgs","repos_url":"https://api.github.com/users/centipeda/repos","events_url":"https://api.github.com/users/centipeda/events{/privacy}","received_events_url":"https://api.github.com/users/centipeda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-26T11:44:32Z","updated_at":"2016-10-27T05:19:56Z","closed_at":null,"body":"I'm asking mostly because of issue #3, for periodic notifications from repositories on GitHub. There are a few ways I've found you can accomplish this -- manually caching all repo data, installing webhooks on each repo, and reporting the notifications you receive when you \"watch\" a repository as a user.\r\n\r\nAttempting to cache the data of the repos you want notifications from is incredibly unwieldy (and raises questions of privacy).  \r\nInstalling webhooks onto a repo is the most convenient solution and works well, but requires permission from the repo owner to install webhooks. Additionally, there is already integrated support for webhooks within Discord, which already functions with GitHub. I'm going to **assume** that anyone who wants notifications from GitHub through Discord and has the permission to install webhooks on all the repos they want notifications from would use Discord's builtin stuff.  \r\n\r\nThat leaves the third option, \"watching\". You can, through the API, set a repo to being \"Watched\", in the same way you'd click \"Watch\" on a repository or organization to receive notifications when there's activity. This requires the cog to log in through the API with a GitHub username and password/personal access token. This raises the question of whose account the cog should be granted access to. If the bot owner gives his credentials to the bot and lets users subscribe the bot to arbitrary repos, then the bot owner is now potentially flooded with notifications from repositories he didn't subscribe to himself. The only other option (that I can think of) is to create an entirely new account for the bot and use *that* account's credentials to log in and subscribe to repos, which seems  inconvenient and unnecessary for an application as small as this. Who, then, should the bot authenticate as?\r\n\r\nThere's probably a much simpler solution staring me in the face, but I can't see it right now. Your thoughts would be appreciated."},"comment":{"url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/comments/256548944","html_url":"https://github.com/FreeCodeCampGuam/FCCG-Cogs/issues/14#issuecomment-256548944","issue_url":"https://api.github.com/repos/FreeCodeCampGuam/FCCG-Cogs/issues/14","id":256548944,"user":{"login":"centipeda","id":16915320,"avatar_url":"https://avatars.githubusercontent.com/u/16915320?v=3","gravatar_id":"","url":"https://api.github.com/users/centipeda","html_url":"https://github.com/centipeda","followers_url":"https://api.github.com/users/centipeda/followers","following_url":"https://api.github.com/users/centipeda/following{/other_user}","gists_url":"https://api.github.com/users/centipeda/gists{/gist_id}","starred_url":"https://api.github.com/users/centipeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centipeda/subscriptions","organizations_url":"https://api.github.com/users/centipeda/orgs","repos_url":"https://api.github.com/users/centipeda/repos","events_url":"https://api.github.com/users/centipeda/events{/privacy}","received_events_url":"https://api.github.com/users/centipeda/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T05:19:56Z","updated_at":"2016-10-27T05:19:56Z","body":"Oh, dang, that should work much better. I'all double-check the docs and see if that can be done."}}
{"actor":{"display_login":"centipeda"}}