{"action":"created","issue":{"url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/98","repository_url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org","labels_url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/98/comments","events_url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/98/events","html_url":"https://github.com/conventional-commits/conventionalcommits.org/issues/98","id":369304363,"node_id":"MDU6SXNzdWUzNjkzMDQzNjM=","number":98,"title":"Resolving ambiguity in the spec","user":{"login":"mrwilson","id":460299,"node_id":"MDQ6VXNlcjQ2MDI5OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/460299?v=4","gravatar_id":"","url":"https://api.github.com/users/mrwilson","html_url":"https://github.com/mrwilson","followers_url":"https://api.github.com/users/mrwilson/followers","following_url":"https://api.github.com/users/mrwilson/following{/other_user}","gists_url":"https://api.github.com/users/mrwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/mrwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrwilson/subscriptions","organizations_url":"https://api.github.com/users/mrwilson/orgs","repos_url":"https://api.github.com/users/mrwilson/repos","events_url":"https://api.github.com/users/mrwilson/events{/privacy}","received_events_url":"https://api.github.com/users/mrwilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-10-11T21:04:02Z","updated_at":"2018-10-22T16:32:35Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nI'm a big fan of conventional commits, and have been using it on most of our work projects and all of my personal projects, so thank you.\r\n\r\nI've been trying to implement a parser for the spec [here](https://github.com/mrwilson/conventional-commit) and have a question.\r\n\r\nGiven \r\n> A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.\r\n\r\nand\r\n\r\n> A footer MAY be provided one blank line after the body (or after the description if body is missing).\r\n\r\nHow can automated process tell the difference between a commit message with just a description and a commit message with just a footer?\r\n\r\nThanks,\r\n\r\nAlex"},"comment":{"url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/comments/431888899","html_url":"https://github.com/conventional-commits/conventionalcommits.org/issues/98#issuecomment-431888899","issue_url":"https://api.github.com/repos/conventional-commits/conventionalcommits.org/issues/98","id":431888899,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTg4ODg5OQ==","user":{"login":"zeke","id":2289,"node_id":"MDQ6VXNlcjIyODk=","avatar_url":"https://avatars1.githubusercontent.com/u/2289?v=4","gravatar_id":"","url":"https://api.github.com/users/zeke","html_url":"https://github.com/zeke","followers_url":"https://api.github.com/users/zeke/followers","following_url":"https://api.github.com/users/zeke/following{/other_user}","gists_url":"https://api.github.com/users/zeke/gists{/gist_id}","starred_url":"https://api.github.com/users/zeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeke/subscriptions","organizations_url":"https://api.github.com/users/zeke/orgs","repos_url":"https://api.github.com/users/zeke/repos","events_url":"https://api.github.com/users/zeke/events{/privacy}","received_events_url":"https://api.github.com/users/zeke/received_events","type":"User","site_admin":true},"created_at":"2018-10-22T16:32:35Z","updated_at":"2018-10-22T16:32:35Z","author_association":"CONTRIBUTOR","body":"> how does the parser deal with this ambiguity?\r\n\r\nHere's what [parse-commit-message](https://github.com/tunnckoCore/parse-commit-message/blob/0dd4cf9c0babe7ffb68ca7c18aa8ebfc85a9ebd6/src/lib/parse.ts#L28-L29) does:\r\n\r\n```ts\r\nconst elements = commitMessage.split(/\\r?\\n\\r?\\n/);\r\nconst headerStr: string = elements[0];\r\nconst body: string | null = elements.length > 2 ? elements[1] : null;\r\nconst footer: string = elements.length > 2 ? elements[2] : elements[1];\r\n``` "}}
{"actor":{"display_login":"zeke"}}