{"action":"created","issue":{"url":"https://api.github.com/repos/marionebl/commitlint/issues/469","repository_url":"https://api.github.com/repos/marionebl/commitlint","labels_url":"https://api.github.com/repos/marionebl/commitlint/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/marionebl/commitlint/issues/469/comments","events_url":"https://api.github.com/repos/marionebl/commitlint/issues/469/events","html_url":"https://github.com/marionebl/commitlint/pull/469","id":369927683,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNzMyNDcw","number":469,"title":"feat: add support for git submodules","user":{"login":"ericcornelissen","id":3742559,"node_id":"MDQ6VXNlcjM3NDI1NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/3742559?v=4","gravatar_id":"","url":"https://api.github.com/users/ericcornelissen","html_url":"https://github.com/ericcornelissen","followers_url":"https://api.github.com/users/ericcornelissen/followers","following_url":"https://api.github.com/users/ericcornelissen/following{/other_user}","gists_url":"https://api.github.com/users/ericcornelissen/gists{/gist_id}","starred_url":"https://api.github.com/users/ericcornelissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericcornelissen/subscriptions","organizations_url":"https://api.github.com/users/ericcornelissen/orgs","repos_url":"https://api.github.com/users/ericcornelissen/repos","events_url":"https://api.github.com/users/ericcornelissen/events{/privacy}","received_events_url":"https://api.github.com/users/ericcornelissen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-14T18:06:43Z","updated_at":"2018-11-30T04:00:11Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/marionebl/commitlint/pulls/469","html_url":"https://github.com/marionebl/commitlint/pull/469","diff_url":"https://github.com/marionebl/commitlint/pull/469.diff","patch_url":"https://github.com/marionebl/commitlint/pull/469.patch"},"body":"Implements build-in support for linting the commits of _git sub modules_, which currently doesn't work because _sub modules_ don't have their own `.git` folder.\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nI updated the read module to determine if it is running from a git sub module or not and find the `COMMIT_EDITMSG` accordingly. It still uses `edit` argument if present, otherwise it looks at `.git` and checks whether it is a directory (if it is, look for the `COMMIT_EDITMSG` as before) or a file, in which case it reads the file to figure out where the `COMMIT_EDITMSG` can be found.\r\n\r\nComments on my implementation are welcome, I'm happy to change it if needed 🙂 \r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nThis change is required in order to support linting the commits of git sub modules.\r\n\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nFixes #448\r\n\r\n## Usage examples\r\nn/a\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\nTests are missing from this PR (at least for now) as it requires an update to the [@commitlint/test](https://github.com/marionebl/commitlint/tree/master/%40packages/test) package (support for sub modules in the `git` helper has to be added). However, I did create a test locally with a rough outline of what the update to the [@commitlint/test](https://github.com/marionebl/commitlint/tree/master/%40packages/test) might look like. You can find the required changes in this [gist](https://gist.github.com/ericcornelissen/cdc4cbaeae5f75b749c2893ce21455fc), simply checkout on this branch and replace the local files with the two in the gist and you can test the new feature.\r\n\r\nThe reason I opened this PR first is because I wanted to be sure this would be included before updating the [@commitlint/test](https://github.com/marionebl/commitlint/tree/master/%40packages/test) code and adding something that wasn't really needed...\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] 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<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [ ] I have added tests to cover my changes. (see \"How Has This Been Tested?\" for details)\r\n- [x] All new and existing tests passed.\r\n"},"comment":{"url":"https://api.github.com/repos/marionebl/commitlint/issues/comments/443083384","html_url":"https://github.com/marionebl/commitlint/pull/469#issuecomment-443083384","issue_url":"https://api.github.com/repos/marionebl/commitlint/issues/469","id":443083384,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzA4MzM4NA==","user":{"login":"marionebl","id":4248851,"node_id":"MDQ6VXNlcjQyNDg4NTE=","avatar_url":"https://avatars1.githubusercontent.com/u/4248851?v=4","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":"2018-11-30T04:00:10Z","updated_at":"2018-11-30T04:00:10Z","author_association":"OWNER","body":"Thanks for the PR @ericcornelissen! Could you provide us with a minimal test case you used to implement this? I'd like to include it as a fixture/test pair for the cli package."}}
{"actor":{"display_login":"marionebl"}}