{"action":"created","issue":{"url":"https://api.github.com/repos/habitat-sh/builder/issues/273","repository_url":"https://api.github.com/repos/habitat-sh/builder","labels_url":"https://api.github.com/repos/habitat-sh/builder/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/habitat-sh/builder/issues/273/comments","events_url":"https://api.github.com/repos/habitat-sh/builder/issues/273/events","html_url":"https://github.com/habitat-sh/builder/pull/273","id":303668015,"number":273,"title":"Make sign in via oauth more generic and add support for Bitbucket","user":{"login":"raskchanky","id":947,"avatar_url":"https://avatars1.githubusercontent.com/u/947?v=4","gravatar_id":"","url":"https://api.github.com/users/raskchanky","html_url":"https://github.com/raskchanky","followers_url":"https://api.github.com/users/raskchanky/followers","following_url":"https://api.github.com/users/raskchanky/following{/other_user}","gists_url":"https://api.github.com/users/raskchanky/gists{/gist_id}","starred_url":"https://api.github.com/users/raskchanky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskchanky/subscriptions","organizations_url":"https://api.github.com/users/raskchanky/orgs","repos_url":"https://api.github.com/users/raskchanky/repos","events_url":"https://api.github.com/users/raskchanky/events{/privacy}","received_events_url":"https://api.github.com/users/raskchanky/received_events","type":"User","site_admin":false},"labels":[{"id":858216117,"url":"https://api.github.com/repos/habitat-sh/builder/labels/A-builder","name":"A-builder","color":"87B09A","default":false},{"id":858216189,"url":"https://api.github.com/repos/habitat-sh/builder/labels/C-feature","name":"C-feature","color":"ff9012","default":false},{"id":858216236,"url":"https://api.github.com/repos/habitat-sh/builder/labels/E-less-easy","name":"E-less-easy","color":"4296b4","default":false},{"id":858216260,"url":"https://api.github.com/repos/habitat-sh/builder/labels/L-javascript","name":"L-javascript","color":"5c6670","default":false},{"id":858216248,"url":"https://api.github.com/repos/habitat-sh/builder/labels/L-rust","name":"L-rust","color":"5c6670","default":false},{"id":858216294,"url":"https://api.github.com/repos/habitat-sh/builder/labels/T-DO-NOT-MERGE","name":"T-DO-NOT-MERGE","color":"d62f3f","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T23:17:29Z","updated_at":"2018-03-08T23:17:31Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/habitat-sh/builder/pulls/273","html_url":"https://github.com/habitat-sh/builder/pull/273","diff_url":"https://github.com/habitat-sh/builder/pull/273.diff","patch_url":"https://github.com/habitat-sh/builder/pull/273.patch"},"body":"🚧 🚧 🚧 🔥 🔥 💀 🔥 🔥 🚧 🚧 🚧 \r\n\r\nSTOP.  THIS IS NOT READY TO MERGE OR REVIEW YET.  THERE IS MORE COMING.\r\n\r\nThis PR attempts to decouple our reliance on GitHub for authentication by making the process a bit more generic.  There is certainly more work that can be done on this front, but this is the first pass.  I've focused on integration with Bitbucket in this PR, as that's been requested in the past.\r\n\r\nThere are a few new crates in this PR:\r\n\r\n* `bitbucket-api-client` adds a bare-bones API client to talk to Bitbucket (surprise!).  No attempt was made to provide comprehensive coverage of Bitbucket's API.  Only two methods are implemented: `authorize`, for exchanging an oauth code for an access token, and `user` for fetching the user's login details once an access token has been obtained.\r\n\r\n* `oauth-common` is a crate that's designed to be consumed by any API client that needs to support oauth.  It provides an `OAuthClient` trait as well as basic structs like `OAuthError` and `OAuthUser`, to ensure that all oauth clients are returning the same data.\r\n\r\nYou can note, if you wish, that some of the existing granularity around GitHub errors was lost when implementing the `OAuthClient` trait in the `github-api-client` crate.  This is definitely regrettable, and I am open to other approaches, but I specifically wanted to avoid a circular dependency, where `oauth-common` depended on `github-api-client`, in order to know the specifics of its error type.\r\n\r\nYou can also note, if you wish, that during the course of my work on this feature, the `github-api-client` crate moved from the `habitat` to the `builder` repo, and several changes were made to it to instrument metrics. I've made painstaking efforts here to ensure that no code changes were lost, but please alert me if you notice an oversight on my part with that code in particular.\r\n\r\n![](https://media.giphy.com/media/jfsaMQr3GNkKk/giphy.gif)\r\n\r\nSigned-off-by: Josh Black <raskchanky@gmail.com>"},"comment":{"url":"https://api.github.com/repos/habitat-sh/builder/issues/comments/371658339","html_url":"https://github.com/habitat-sh/builder/pull/273#issuecomment-371658339","issue_url":"https://api.github.com/repos/habitat-sh/builder/issues/273","id":371658339,"user":{"login":"thesentinels","id":18452204,"avatar_url":"https://avatars3.githubusercontent.com/u/18452204?v=4","gravatar_id":"","url":"https://api.github.com/users/thesentinels","html_url":"https://github.com/thesentinels","followers_url":"https://api.github.com/users/thesentinels/followers","following_url":"https://api.github.com/users/thesentinels/following{/other_user}","gists_url":"https://api.github.com/users/thesentinels/gists{/gist_id}","starred_url":"https://api.github.com/users/thesentinels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesentinels/subscriptions","organizations_url":"https://api.github.com/users/thesentinels/orgs","repos_url":"https://api.github.com/users/thesentinels/repos","events_url":"https://api.github.com/users/thesentinels/events{/privacy}","received_events_url":"https://api.github.com/users/thesentinels/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T23:17:31Z","updated_at":"2018-03-08T23:17:31Z","author_association":"CONTRIBUTOR","body":"Thanks for the pull request! Here is what will happen next:\n 1. Your PR will be reviewed by the maintainers\n 2. If everything looks good, one of them will `approve` it, and your PR will be merged.\n\nThank you for contributing!"}}
{"actor":{"display_login":"thesentinels"}}