{"action":"created","issue":{"url":"https://api.github.com/repos/lerna/lerna/issues/1020","repository_url":"https://api.github.com/repos/lerna/lerna","labels_url":"https://api.github.com/repos/lerna/lerna/issues/1020/labels{/name}","comments_url":"https://api.github.com/repos/lerna/lerna/issues/1020/comments","events_url":"https://api.github.com/repos/lerna/lerna/issues/1020/events","html_url":"https://github.com/lerna/lerna/pull/1020","id":259210399,"number":1020,"title":"Fixes #1008 by not using the passed canary flag as a commit id","user":{"login":"achingbrain","id":665810,"avatar_url":"https://avatars0.githubusercontent.com/u/665810?v=4","gravatar_id":"","url":"https://api.github.com/users/achingbrain","html_url":"https://github.com/achingbrain","followers_url":"https://api.github.com/users/achingbrain/followers","following_url":"https://api.github.com/users/achingbrain/following{/other_user}","gists_url":"https://api.github.com/users/achingbrain/gists{/gist_id}","starred_url":"https://api.github.com/users/achingbrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achingbrain/subscriptions","organizations_url":"https://api.github.com/users/achingbrain/orgs","repos_url":"https://api.github.com/users/achingbrain/repos","events_url":"https://api.github.com/users/achingbrain/events{/privacy}","received_events_url":"https://api.github.com/users/achingbrain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-20T15:40:57Z","updated_at":"2017-09-25T01:53:37Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/lerna/lerna/pulls/1020","html_url":"https://github.com/lerna/lerna/pull/1020","diff_url":"https://github.com/lerna/lerna/pull/1020.diff","patch_url":"https://github.com/lerna/lerna/pull/1020.patch"},"body":"## Description\r\n\r\nThe docs say [we should be able to override the meta suffix by passing the canary flag as a string value](https://github.com/lerna/lerna#--canary--c).  lerna takes this value and tries to use it to work out what range of commits it should consider when publishing a package so you can't actually override the meta suffix unless you use a commit id to do this.  Considering the commit id is added to the version number for canary releases anyway this seems redundant.\r\n\r\neg:\r\n\r\nThis works:\r\n```\r\nlerna publish --canary\r\n...\r\nChanges:\r\n - package-1: 1.0.0 => 1.1.0-alpha.0a2f1a97\r\n - package-1: 1.0.0 => 1.1.0-alpha.0a2f1a97\r\n```\r\n\r\nAccording to the docs this should work but doesn't:\r\n```\r\nlerna publish --canary=beta\r\n...\r\nlerna ERR! initialize Error: fatal: bad revision 'beta^..beta'\r\n*kaboom!*\r\n```\r\n\r\n## Motivation and Context\r\n\r\nIt would be useful to be able to override the meta suffix as described in the docs.\r\n\r\nFixes #1008.\r\n\r\n## How Has This Been Tested?\r\n\r\nAdded some unit tests for the `UpdatedPackagesCollector` module and integration tests for the canary flag.\r\n\r\n## Types of changes\r\n\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n"},"comment":{"url":"https://api.github.com/repos/lerna/lerna/issues/comments/331757959","html_url":"https://github.com/lerna/lerna/pull/1020#issuecomment-331757959","issue_url":"https://api.github.com/repos/lerna/lerna/issues/1020","id":331757959,"user":{"login":"GeorgeTaveras1231","id":3114629,"avatar_url":"https://avatars1.githubusercontent.com/u/3114629?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgeTaveras1231","html_url":"https://github.com/GeorgeTaveras1231","followers_url":"https://api.github.com/users/GeorgeTaveras1231/followers","following_url":"https://api.github.com/users/GeorgeTaveras1231/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeTaveras1231/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeTaveras1231/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeTaveras1231/subscriptions","organizations_url":"https://api.github.com/users/GeorgeTaveras1231/orgs","repos_url":"https://api.github.com/users/GeorgeTaveras1231/repos","events_url":"https://api.github.com/users/GeorgeTaveras1231/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeTaveras1231/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T01:53:37Z","updated_at":"2017-09-25T01:53:37Z","author_association":"NONE","body":"@achingbrain was going to work on this myself but glad to see you got this.\r\n\r\nAdditionally, I wanted to raise a concern with the lerna maintainers about the role that the `canary` option value is playing and whether it also needs to be used as the `pre-id`, even though there is already a flag to define the `pre-id`. It's not a huge deal but it just feels inconsistent and my response was 🤔 when I realized I could not use `--pre-id` for this."}}
{"actor":{"display_login":"GeorgeTaveras1231"}}