diff --git a/.travis.yml b/.travis.yml index cd2d274..3233c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ branches: before_install: - echo -e "machine github.com\n login $GITHUB_TOKEN" >> ~/.netrc - git lfs pull -- gem install github_changelog_generator after_success: - yarn global add codecov.io coveralls github-release-from-changelog @@ -26,12 +25,6 @@ after_success: changed_files=$(git diff --name-status "$TRAVIS_COMMIT_RANGE" | tr '\t' ' ') if [[ "master" == "$TRAVIS_BRANCH" && "$changed_files" == "M package.json" ]]; then ( - github_changelog_generator --token $GITHUB_TOKEN --date-format %y/%m/%d - remote=$(git config --get remote.origin.url) - git remote set-url origin "${remote/github.com/$GITHUB_TOKEN:x-oauth-basic@github.com}" - git add CHANGELOG.md - git commit -m "Auto-update generate CHANGELOG.md" - git push origin "$TRAVIS_BRANCH" github-release-from-changelog ) fi diff --git a/README.md b/README.md index 144bd9a..4708b2d 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,23 @@ Bundle size should be minimum as possible | `yarn test` | Start test enviroiment for development | | `yarn test:coverage` | Display tests coverage | +## Contribute +## Git Commit Guidelines + +We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, +we use the git commit messages to **generate the our change log**. + +The commit message formatting can be added using a typical git workflow or through the use of a CLI +wizard ([Commitizen](/~https://github.com/commitizen/cz-cli)). To use the wizard, run `yarn run cm` +in your terminal after staging your changes in git. + +A detailed explanation borrowed from angular and can be found in this [document][commit-message-format]. + ## Todo -* [ ] Automate Changelist.md +* [x] Automate Changelist.md * [ ] E2E Tests -* [x] react-redux -* [x] storybook. Please check the [issue status](/~https://github.com/storybooks/storybook/issues/1519) * [ ] i18n * [ ] Red box for react errors? * [ ] Server side rendering -* [x] TS Config enable `noImplicitAny": true` + +[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# \ No newline at end of file diff --git a/package.json b/package.json index 4e59788..9feaf68 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "description": "React & typescript boilerplate", "repository": "/~https://github.com/nfq-eta/react-typescript", "scripts": { - "cm": "git cz", + "cm": "git-cz", "prestart": "tcm src", "start": "cross-env NODE_ENV=development webpack-dev-server --open --content-base dist --env=dev", "prebuild": "tcm src && rimraf ./dist ./coverage", @@ -72,6 +72,7 @@ "cross-env": "5.1.1", "css-hot-loader": "1.3.4", "css-loader": "0.28.7", + "cz-conventional-changelog": "2.1.0", "enzyme": "3.2.0", "enzyme-adapter-react-16": "1.1.0", "enzyme-to-json": "3.2.2", @@ -172,5 +173,10 @@ "selector-class-pattern": "^[a-z][a-zA-Z0-9]+$", "order/properties-alphabetical-order": null } + }, + "config": { + "commitizen": { + "path": "node_modules/cz-conventional-changelog" + } } } diff --git a/yarn.lock b/yarn.lock index b0d2a4b..d0af278 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3108,6 +3108,16 @@ cz-conventional-changelog@1.2.0: right-pad "^1.0.1" word-wrap "^1.0.3" +cz-conventional-changelog@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-2.1.0.tgz#2f4bc7390e3244e4df293e6ba351e4c740a7c764" + dependencies: + conventional-commit-types "^2.0.0" + lodash.map "^4.5.1" + longest "^1.0.1" + right-pad "^1.0.1" + word-wrap "^1.0.3" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"