{"action":"created","issue":{"url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/12","repository_url":"https://api.github.com/repos/marionebl/conventional-changelog-lint","labels_url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/12/comments","events_url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/12/events","html_url":"https://github.com/marionebl/conventional-changelog-lint/issues/12","id":171283268,"number":12,"title":"How to lint all commits in a PR?","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars1.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"labels":[{"id":331795418,"url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/labels/documentation","name":"documentation","color":"bfdadc","default":false},{"id":331795493,"url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/labels/feature","name":"feature","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-15T23:11:35Z","updated_at":"2017-04-08T19:51:43Z","closed_at":null,"body":"I'd like to integrate `conventional-changelog-lint` into my CI process. I can enforce a commit convention on \"client side\" using Husky as per docs, but how would I enforce the convention on CI?\n\nAssuming that a PR is a list of commits that do not exist on master, then getting those commits is simple:\n\n``` bash\ngit log master..$(git symbolic-ref --short HEAD)\n```\n\nI am not sure though whats the best way to feed them to conventional-changelog-lint. Here is what I have ended up with for now:\n\n``` bash\nfor sha in $(git --no-pager rev-list master..$(git symbolic-ref --short HEAD)); do git cat-file commit $sha | sed '1,/^$/d' | conventional-changelog-lint; done\n```\n\nThe problem with the latter is that it doesn't exit if either of the validation fails.\n"},"comment":{"url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/comments/292741515","html_url":"https://github.com/marionebl/conventional-changelog-lint/issues/12#issuecomment-292741515","issue_url":"https://api.github.com/repos/marionebl/conventional-changelog-lint/issues/12","id":292741515,"user":{"login":"marionebl","id":4248851,"avatar_url":"https://avatars2.githubusercontent.com/u/4248851?v=3","gravatar_id":"","url":"https://api.github.com/users/marionebl","html_url":"https://github.com/marionebl","followers_url":"https://api.github.com/users/marionebl/followers","following_url":"https://api.github.com/users/marionebl/following{/other_user}","gists_url":"https://api.github.com/users/marionebl/gists{/gist_id}","starred_url":"https://api.github.com/users/marionebl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marionebl/subscriptions","organizations_url":"https://api.github.com/users/marionebl/orgs","repos_url":"https://api.github.com/users/marionebl/repos","events_url":"https://api.github.com/users/marionebl/events{/privacy}","received_events_url":"https://api.github.com/users/marionebl/received_events","type":"User","site_admin":false},"created_at":"2017-04-08T19:51:43Z","updated_at":"2017-04-08T19:51:43Z","body":"I tested \r\n\r\n```\r\nconventional-changelog-lint --from=$TRAVIS_BRANCH --to=$TRAVIS_PULL_REQUEST_BRANCH\r\n```\r\n\r\nwith success so far."}}
{"actor":{"display_login":"marionebl"}}