{"action":"created","issue":{"url":"https://api.github.com/repos/npm/osenv/issues/8","repository_url":"https://api.github.com/repos/npm/osenv","labels_url":"https://api.github.com/repos/npm/osenv/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/npm/osenv/issues/8/comments","events_url":"https://api.github.com/repos/npm/osenv/issues/8/events","html_url":"https://github.com/npm/osenv/pull/8","id":120657006,"node_id":"MDExOlB1bGxSZXF1ZXN0NTI3ODkxNjQ=","number":8,"title":"Required callbacks for user & hostname","user":{"login":"martinheidegger","id":914122,"node_id":"MDQ6VXNlcjkxNDEyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/914122?v=4","gravatar_id":"","url":"https://api.github.com/users/martinheidegger","html_url":"https://github.com/martinheidegger","followers_url":"https://api.github.com/users/martinheidegger/followers","following_url":"https://api.github.com/users/martinheidegger/following{/other_user}","gists_url":"https://api.github.com/users/martinheidegger/gists{/gist_id}","starred_url":"https://api.github.com/users/martinheidegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinheidegger/subscriptions","organizations_url":"https://api.github.com/users/martinheidegger/orgs","repos_url":"https://api.github.com/users/martinheidegger/repos","events_url":"https://api.github.com/users/martinheidegger/events{/privacy}","received_events_url":"https://api.github.com/users/martinheidegger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2015-12-06T20:20:23Z","updated_at":"2019-02-20T15:17:00Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/npm/osenv/pulls/8","html_url":"https://github.com/npm/osenv/pull/8","diff_url":"https://github.com/npm/osenv/pull/8.diff","patch_url":"https://github.com/npm/osenv/pull/8.patch"},"body":"This PR proposes a fix to an issue/bug in the osenv API.\r\n\r\nBoth the `user` and `hostname` methods can optionally fallback to the executables: `whoami` and `hostname`. If a fallback happens, that fallback will be **async**. In other words, depending on the environment `user = osenv.user()` may or may-not work as intended. `osenv.user((err, user) => {}` will always work as intended with the fallback. The important thing here is that the user will not notice the error.\r\n\r\nTo mitigate this, this PR uses a soft-breaking API. `osenv.user()` and `osenv.hostname()` will always return `undefined`. With a callback it will work, consistently.\r\n\r\nAn alternative solution to this would be to throw an error if no callback is given and/or write a deprecation warning."},"comment":{"url":"https://api.github.com/repos/npm/osenv/issues/comments/465620579","html_url":"https://github.com/npm/osenv/pull/8#issuecomment-465620579","issue_url":"https://api.github.com/repos/npm/osenv/issues/8","id":465620579,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NTYyMDU3OQ==","user":{"login":"martinheidegger","id":914122,"node_id":"MDQ6VXNlcjkxNDEyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/914122?v=4","gravatar_id":"","url":"https://api.github.com/users/martinheidegger","html_url":"https://github.com/martinheidegger","followers_url":"https://api.github.com/users/martinheidegger/followers","following_url":"https://api.github.com/users/martinheidegger/following{/other_user}","gists_url":"https://api.github.com/users/martinheidegger/gists{/gist_id}","starred_url":"https://api.github.com/users/martinheidegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinheidegger/subscriptions","organizations_url":"https://api.github.com/users/martinheidegger/orgs","repos_url":"https://api.github.com/users/martinheidegger/repos","events_url":"https://api.github.com/users/martinheidegger/events{/privacy}","received_events_url":"https://api.github.com/users/martinheidegger/received_events","type":"User","site_admin":false},"created_at":"2019-02-20T15:17:00Z","updated_at":"2019-02-20T15:17:00Z","author_association":"NONE","body":"@iarna I updated the description to this PR. I hope it is more explanatory now."}}
{"actor":{"display_login":"martinheidegger"}}