Skip to content

Commit

Permalink
Merge pull request #7 from BerkeleyTrue/chore/ci-commit-updates
Browse files Browse the repository at this point in the history
Chore/ci commit updates
  • Loading branch information
BerkeleyTrue committed Jun 4, 2018
2 parents 743b19f + 05dbbd8 commit 4c2e626
Show file tree
Hide file tree
Showing 6 changed files with 3,128 additions and 2,218 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ node_js:
- '8'
- '10'

before_install: if [[ `npm -v` != 5* ]]; then npm i -g npm@5; fi
before_install: if [[ `npm -v` != 6* ]]; then npm i -g npm@6; fi

install:
- npm ci

cache:
directories:
- node_modules
- "$HOME/.npm"

notifications:
webhooks: https://www.travisbuddy.com/

after_success:
- npm run cover:alls
Expand Down
61 changes: 61 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributing

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

When contributing to this repository, it is usually a good idea to first discuss the change you
wish to make via issue, email, or any other method with the owners of this repository before
making a change. This could potentially save a lot of wasted hours.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Development

### Commit Message Format

All commits on the this repository follow the
[Conventional Changelog standard](https://github.com/conventional-changelog/conventional-changelog-eslint/blob/master/convention.md).
It is a very simple format so you can still write commit messages by hand. However it is
highly recommended developers install [Commitizen](https://commitizen.github.io/cz-cli/),
it extends the git command and will make writing commit messages a breeze. This
repository is configured with a local Commitizen configuration script.

```bash
npm run commit
```

Getting Commitizen installed globally is usually trivial, just install it via npm. You will also
need to install the cz-conventional-changelog adapter which this repository is configured
to use.

```bash
npm install -g commitizen cz-conventional-changelog
```

Below is an example of Commitizen in action. It replaces your usual `git commit` command
with `git cz` instead. The new command takes all the same arguments however it leads you
through an interactive process to generate the commit message.

![Commitizen friendly](http://aparapi.com/images/commitizen.gif)

Commit messages are used to automatically generate our changelogs, and to ensure
commits are searchable in a useful way. So please use the Commitizen tool and adhere to
the commit message standard or else we cannot accept Pull Requests without editing
them first.

Below is an example of a properly formated commit message.

```
chore(Commitizen): Made repository Commitizen friendly.
Added standard Commitizen configuration files to the repo along with all the custom rules.
ISSUES CLOSED: #31
```

### Pull Request Process

1. Ensure that install or build dependencies do not appear in any commits in your code branch.
2. Ensure all commit messages follow the [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog-eslint/blob/master/convention.md)
standard explained earlier.
4. Your pull request will either be approved or feedback will be given on what needs to be
fixed to get approval.
6 changes: 6 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: [ '@commitlint/config-conventional' ],
rules: {
'scope-case': [ 0 ],
},
};
Loading

0 comments on commit 4c2e626

Please sign in to comment.