{"action":"created","issue":{"url":"https://api.github.com/repos/willthames/ansible-review/issues/73","repository_url":"https://api.github.com/repos/willthames/ansible-review","labels_url":"https://api.github.com/repos/willthames/ansible-review/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/willthames/ansible-review/issues/73/comments","events_url":"https://api.github.com/repos/willthames/ansible-review/issues/73/events","html_url":"https://github.com/willthames/ansible-review/pull/73","id":373286419,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MjUxMDAw","number":73,"title":"Fix reading from stdin under Python 3","user":{"login":"webknjaz","id":578543,"node_id":"MDQ6VXNlcjU3ODU0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/578543?v=4","gravatar_id":"","url":"https://api.github.com/users/webknjaz","html_url":"https://github.com/webknjaz","followers_url":"https://api.github.com/users/webknjaz/followers","following_url":"https://api.github.com/users/webknjaz/following{/other_user}","gists_url":"https://api.github.com/users/webknjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webknjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webknjaz/subscriptions","organizations_url":"https://api.github.com/users/webknjaz/orgs","repos_url":"https://api.github.com/users/webknjaz/repos","events_url":"https://api.github.com/users/webknjaz/events{/privacy}","received_events_url":"https://api.github.com/users/webknjaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-24T03:11:15Z","updated_at":"2018-11-22T13:44:28Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/willthames/ansible-review/pulls/73","html_url":"https://github.com/willthames/ansible-review/pull/73","diff_url":"https://github.com/willthames/ansible-review/pull/73.diff","patch_url":"https://github.com/willthames/ansible-review/pull/73.patch"},"body":"Unidiff tries to decode input internally.\r\nUnder Python3 sys.stdin emits unicode strings, but underlying bytes\r\nare available under the buffer property.\r\n\r\nCurrent version of ansible-review:\r\n```python-traceback\r\n$ git diff master... | ansible-review                                                                                                \r\nWARN: No configuration file found at ~/.config/ansible-review/config.ini\r\nWARN: Using example standards found at ~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/examples\r\nWARN: Using example lint-rules found at ~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/examples/lint-rules\r\nTraceback (most recent call last):\r\n  File \"~/.pyenv/versions/ansiwatch-bot-py3.7.1-pyenv-venv/bin/ansible-review\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/__main__.py\", line 76, in main\r\n    candidates = get_candidates_from_diff(sys.stdin)\r\n  File \"~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/__main__.py\", line 20, in get_candidates_from_diff\r\n    patch = unidiff.PatchSet(difftext, encoding='utf-8')\r\n  File \"~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/unidiff/patch.py\", line 353, in __init__\r\n    self._parse(data, encoding=encoding)\r\n  File \"~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/unidiff/patch.py\", line 368, in _parse\r\n    line = line.decode(encoding)\r\nAttributeError: 'str' object has no attribute 'decode'\r\n```\r\n\r\nVersion `ansible-review` with this patch:\r\n```python-traceback\r\n$ git diff master... | ansible-review            \r\nWARN: No configuration file found at ~/.config/ansible-review/config.ini\r\nWARN: Using example standards found at ~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/examples\r\nWARN: Using example lint-rules found at ~/.pyenv/versions/3.7.1/envs/ansiwatch-bot-py3.7.1-pyenv-venv/lib/python3.7/site-packages/ansiblereview/examples/lint-rules\r\nWARN: Template molecule/default/Dockerfile.j2 is in a role that contains a meta/main.yml without a declared standards version. Using latest standards version 0.1\r\nWARN: Playbook molecule/default/molecule.yml does not present standards version. Using latest standards version 0.1\r\nWARN: Playbook molecule/default/playbook.yml does not present standards version. Using latest standards version 0.1\r\nWARN: Playbook configure-userspace.yml does not present standards version. Using latest standards version 0.1\r\nWARN: Best practice \"Playbooks should not contain logic (vars, tasks, handlers)\" not met:\r\nconfigure-userspace.yml:2: [EXTRA0008] tasks should not be required in a play\r\n```"},"comment":{"url":"https://api.github.com/repos/willthames/ansible-review/issues/comments/441035063","html_url":"https://github.com/willthames/ansible-review/pull/73#issuecomment-441035063","issue_url":"https://api.github.com/repos/willthames/ansible-review/issues/73","id":441035063,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTAzNTA2Mw==","user":{"login":"webknjaz","id":578543,"node_id":"MDQ6VXNlcjU3ODU0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/578543?v=4","gravatar_id":"","url":"https://api.github.com/users/webknjaz","html_url":"https://github.com/webknjaz","followers_url":"https://api.github.com/users/webknjaz/followers","following_url":"https://api.github.com/users/webknjaz/following{/other_user}","gists_url":"https://api.github.com/users/webknjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webknjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webknjaz/subscriptions","organizations_url":"https://api.github.com/users/webknjaz/orgs","repos_url":"https://api.github.com/users/webknjaz/repos","events_url":"https://api.github.com/users/webknjaz/events{/privacy}","received_events_url":"https://api.github.com/users/webknjaz/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T13:44:28Z","updated_at":"2018-11-22T13:44:28Z","author_association":"NONE","body":"*/me triggered CI build by reopening the PR*"}}
{"actor":{"display_login":"webknjaz"}}