{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1518","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1518/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1518/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1518/events","html_url":"https://github.com/checkstyle/checkstyle/pull/1518","id":98423756,"number":1518,"title":"Added tests for validating commit message. Issue #937","user":{"login":"liscju","id":6627878,"avatar_url":"https://avatars.githubusercontent.com/u/6627878?v=3","gravatar_id":"","url":"https://api.github.com/users/liscju","html_url":"https://github.com/liscju","followers_url":"https://api.github.com/users/liscju/followers","following_url":"https://api.github.com/users/liscju/following{/other_user}","gists_url":"https://api.github.com/users/liscju/gists{/gist_id}","starred_url":"https://api.github.com/users/liscju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liscju/subscriptions","organizations_url":"https://api.github.com/users/liscju/orgs","repos_url":"https://api.github.com/users/liscju/repos","events_url":"https://api.github.com/users/liscju/events{/privacy}","received_events_url":"https://api.github.com/users/liscju/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-31T16:25:08Z","updated_at":"2015-08-28T07:53:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/1518","html_url":"https://github.com/checkstyle/checkstyle/pull/1518","diff_url":"https://github.com/checkstyle/checkstyle/pull/1518.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/1518.patch"},"body":"To specification of patterns for commit message to match (from:\r\nhttps://github.com/checkstyle/checkstyle/wiki/Release-notes-automation#validation-of-last-commit-message-to-reference-issue-number )\r\nI added newline character before end of pattern because in my environment git always add it to the end of message. I cant find information in web about this behaviour , so i dont know if it is common for git or my env. Matter to discuss is extracting class like CommitMessageValidation where matching could be done, instead of doing it in test (lastCommitMessage.matches(ACCEPTED_COMMIT_MESSAGE_PATTERN) )\r\n, if we extract it would be easier to test, but matching functionality is so small that it probably could stay in test."},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/135665119","html_url":"https://github.com/checkstyle/checkstyle/pull/1518#issuecomment-135665119","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1518","id":135665119,"user":{"login":"liscju","id":6627878,"avatar_url":"https://avatars.githubusercontent.com/u/6627878?v=3","gravatar_id":"","url":"https://api.github.com/users/liscju","html_url":"https://github.com/liscju","followers_url":"https://api.github.com/users/liscju/followers","following_url":"https://api.github.com/users/liscju/following{/other_user}","gists_url":"https://api.github.com/users/liscju/gists{/gist_id}","starred_url":"https://api.github.com/users/liscju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liscju/subscriptions","organizations_url":"https://api.github.com/users/liscju/orgs","repos_url":"https://api.github.com/users/liscju/repos","events_url":"https://api.github.com/users/liscju/events{/privacy}","received_events_url":"https://api.github.com/users/liscju/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T07:53:26Z","updated_at":"2015-08-28T07:53:26Z","body":"1) DONE, format in https://github.com/checkstyle/checkstyle/wiki/Release-notes-automation probably should be updated too"}}