{"action":"created","issue":{"url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/17","labels_url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/17/comments","events_url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/17/events","html_url":"https://github.com/gnustavo/Git-Hooks/pull/17","id":67740678,"number":17,"title":"Bugfix: The byte code marker in get_commit().","user":{"login":"mikkoi","id":5240857,"avatar_url":"https://avatars.githubusercontent.com/u/5240857?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkoi","html_url":"https://github.com/mikkoi","followers_url":"https://api.github.com/users/mikkoi/followers","following_url":"https://api.github.com/users/mikkoi/following{/other_user}","gists_url":"https://api.github.com/users/mikkoi/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkoi/subscriptions","organizations_url":"https://api.github.com/users/mikkoi/orgs","repos_url":"https://api.github.com/users/mikkoi/repos","events_url":"https://api.github.com/users/mikkoi/events{/privacy}","received_events_url":"https://api.github.com/users/mikkoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-11T06:05:06Z","updated_at":"2015-04-12T20:07:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gnustavo/Git-Hooks/pulls/17","html_url":"https://github.com/gnustavo/Git-Hooks/pull/17","diff_url":"https://github.com/gnustavo/Git-Hooks/pull/17.diff","patch_url":"https://github.com/gnustavo/Git-Hooks/pull/17.patch"},"body":"When creating an update hook for Jira, I found this bug.\r\nActually, it became apparrent only when encoding to JSON.\r\nSome debug:\r\nJIRA DEBUG: $VAR1 = {\r\n          'body' => 'Finished #EAS-527: Test Commit.\r\n'\r\n        };\r\nJIRA DEBUG: $VAR1 = '{\"body\":\"Finished #EAS-527: Test Commit.\\\\n\\\\u0000\"}';\r\n"},"comment":{"url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/comments/92115304","html_url":"https://github.com/gnustavo/Git-Hooks/pull/17#issuecomment-92115304","issue_url":"https://api.github.com/repos/gnustavo/Git-Hooks/issues/17","id":92115304,"user":{"login":"gnustavo","id":113992,"avatar_url":"https://avatars.githubusercontent.com/u/113992?v=3","gravatar_id":"","url":"https://api.github.com/users/gnustavo","html_url":"https://github.com/gnustavo","followers_url":"https://api.github.com/users/gnustavo/followers","following_url":"https://api.github.com/users/gnustavo/following{/other_user}","gists_url":"https://api.github.com/users/gnustavo/gists{/gist_id}","starred_url":"https://api.github.com/users/gnustavo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnustavo/subscriptions","organizations_url":"https://api.github.com/users/gnustavo/orgs","repos_url":"https://api.github.com/users/gnustavo/repos","events_url":"https://api.github.com/users/gnustavo/events{/privacy}","received_events_url":"https://api.github.com/users/gnustavo/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T20:07:58Z","updated_at":"2015-04-12T20:07:58Z","body":"Thank you Mikko.\r\n\r\nActually, your commit fixes two problems. First, it removes the trailing \"\\c@\" character from the commit body. However, I think a better solution is simply to invoke \"chomp\" at the beginning of the while loop, as it will correctly chomp away the \"\\c@\\cJ\" characters at the end of the commit body.\r\n\r\nSecondly, it passes the \"--encoding=UTF-8\" argument to git-rev-list, which is nice.\r\n\r\nI'll rebase it as two commits and make them part of the next commit."}}