{"action":"created","issue":{"url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/36","labels_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/36/comments","events_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/36/events","html_url":"https://github.com/ajoslin/conventional-changelog/pull/36","id":55987659,"number":36,"title":"feat(changelog): add currentVersion, bump options","user":{"login":"mgartner","id":1128750,"avatar_url":"https://avatars.githubusercontent.com/u/1128750?v=3","gravatar_id":"","url":"https://api.github.com/users/mgartner","html_url":"https://github.com/mgartner","followers_url":"https://api.github.com/users/mgartner/followers","following_url":"https://api.github.com/users/mgartner/following{/other_user}","gists_url":"https://api.github.com/users/mgartner/gists{/gist_id}","starred_url":"https://api.github.com/users/mgartner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgartner/subscriptions","organizations_url":"https://api.github.com/users/mgartner/orgs","repos_url":"https://api.github.com/users/mgartner/repos","events_url":"https://api.github.com/users/mgartner/events{/privacy}","received_events_url":"https://api.github.com/users/mgartner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-30T02:39:26Z","updated_at":"2015-02-20T06:16:24Z","closed_at":"2015-02-19T22:25:57Z","pull_request":{"url":"https://api.github.com/repos/ajoslin/conventional-changelog/pulls/36","html_url":"https://github.com/ajoslin/conventional-changelog/pull/36","diff_url":"https://github.com/ajoslin/conventional-changelog/pull/36.diff","patch_url":"https://github.com/ajoslin/conventional-changelog/pull/36.patch"},"body":"Allows the currentVersion and bump options to be used in place of the version option. Using these options will automatically increment the version number written to the changelog.\r\n\r\nThe motivation for this is that conventional-changelog is hard to use with `npm version major/minor/patch` commands. These commands automatically increment the `package.json` version number, make a new commit on the branch, and tag the commit with the latest version. However, you can't run `npm version major/minor/patch` before updating the changelog, because conventional-changelog will parse no commits since a new tag has just been created, and you can't run `npm version major/minor/patch` after conventional-changelog because the version written to the changelog will be the old version.\r\n\r\nThis feature allows a much easier flow for using this tool with the `npm version` command by allowing the user to pass in the `currentVersion` and `bump` to automatically write a new version to the changelog. The workflow then becomes and easy two-step process:\r\n\r\n1. Update the changelog with conventional-changelog passing the current version in `package.json` and `major`, `minor`, or `patch`.\r\n2. Run `npm version major/minor/patch` using the same bump level used when making the changelog."},"comment":{"url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/comments/75194705","html_url":"https://github.com/ajoslin/conventional-changelog/pull/36#issuecomment-75194705","issue_url":"https://api.github.com/repos/ajoslin/conventional-changelog/issues/36","id":75194705,"user":{"login":"mgartner","id":1128750,"avatar_url":"https://avatars.githubusercontent.com/u/1128750?v=3","gravatar_id":"","url":"https://api.github.com/users/mgartner","html_url":"https://github.com/mgartner","followers_url":"https://api.github.com/users/mgartner/followers","following_url":"https://api.github.com/users/mgartner/following{/other_user}","gists_url":"https://api.github.com/users/mgartner/gists{/gist_id}","starred_url":"https://api.github.com/users/mgartner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgartner/subscriptions","organizations_url":"https://api.github.com/users/mgartner/orgs","repos_url":"https://api.github.com/users/mgartner/repos","events_url":"https://api.github.com/users/mgartner/events{/privacy}","received_events_url":"https://api.github.com/users/mgartner/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T06:16:24Z","updated_at":"2015-02-20T06:16:24Z","body":"Just curious why you say using `npm version` is not the \"usual workflow\". Have you polled users of this package, or have any source that suggests not to use `npm version` in general? It seems to be a useful tool that saves a manual steps just to bump a version number and tag a commit."}}