{"action":"closed","issue":{"url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/74","labels_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/74/comments","events_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/74/events","html_url":"https://github.com/ajoslin/conventional-changelog/issues/74","id":96368260,"number":74,"title":"Version not parsed from package.json if \"repository\" field not set in file.","user":{"login":"klamping","id":706039,"avatar_url":"https://avatars.githubusercontent.com/u/706039?v=3","gravatar_id":"","url":"https://api.github.com/users/klamping","html_url":"https://github.com/klamping","followers_url":"https://api.github.com/users/klamping/followers","following_url":"https://api.github.com/users/klamping/following{/other_user}","gists_url":"https://api.github.com/users/klamping/gists{/gist_id}","starred_url":"https://api.github.com/users/klamping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klamping/subscriptions","organizations_url":"https://api.github.com/users/klamping/orgs","repos_url":"https://api.github.com/users/klamping/repos","events_url":"https://api.github.com/users/klamping/events{/privacy}","received_events_url":"https://api.github.com/users/klamping/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ajoslin/conventional-changelog/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-21T17:08:01Z","updated_at":"2015-07-22T06:52:59Z","closed_at":"2015-07-22T06:52:59Z","body":"The issue occurs on [line 88 of index.js](https://github.com/ajoslin/conventional-changelog/blob/master/index.js#L88). `getPkgRepo` fails if there is no `repository` information, which prevents the version information from being added to the `context` object, causing blank values in the changelog output. \r\n\r\nI'll see if I can get a PR out for this.\r\n\r\nSteps to recreate:\r\n1. Have an NPM repository without a `repository` field:\r\n```\r\n{\r\n  \"name\": \"my-package\",\r\n  \"version\": \"1.0.1\",\r\n}\r\n```\r\n2. Run `conventional-changelog`\r\n3. See that output does not pick up `version` information\r\n"}}