Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

Commit

Permalink
chore(project): make project easier to contribute to (#54)
Browse files Browse the repository at this point in the history
By swapping ghooks for husky, adding a CONTRIBUTING.md and
adding the all-contributors table.

Adding existing committers to the all-contributors table:

@kentcdodds, @remy, @cmalard, @markdalgleish, @ryan-kimber, @jcollado,
@jamischarles, @erquhart, @tusharmath, @bitjson, @hisabimbola, @bahmutov,
@ds82, @mattlewis92, @tlvince, @adjohnson916, @zetlen, @opatut, @bmds,
@emmurillo, and @Starefossen

Thanks everyone!

ref #53
  • Loading branch information
Kent C. Dodds committed Dec 21, 2016
1 parent 12317ca commit 3386784
Show file tree
Hide file tree
Showing 7 changed files with 4,034 additions and 9 deletions.
223 changes: 223 additions & 0 deletions .all-contributorsrc
@@ -0,0 +1,223 @@
{
"projectName": "validate-commit-msg",
"projectOwner": "kentcdodds",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "kentcdodds",
"name": "Kent C. Dodds",
"avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3",
"profile": "https://kentcdodds.com",
"contributions": [
"question",
"code",
"doc",
"review",
"test"
]
},
{
"login": "remy",
"name": "Remy Sharp",
"avatar_url": "https://avatars.githubusercontent.com/u/13700?v=3",
"profile": "http://remysharp.com",
"contributions": [
"code",
"doc",
"test"
]
},
{
"login": "cmalard",
"name": "Cédric Malard",
"avatar_url": "https://avatars.githubusercontent.com/u/1692136?v=3",
"profile": "http://valdun.net",
"contributions": [
"code",
"test"
]
},
{
"login": "markdalgleish",
"name": "Mark Dalgleish",
"avatar_url": "https://avatars.githubusercontent.com/u/696693?v=3",
"profile": "markdalgleish.com",
"contributions": [
"doc"
]
},
{
"login": "ryan-kimber",
"name": "Ryan Kimber",
"avatar_url": "https://avatars.githubusercontent.com/u/1018189?v=3",
"profile": "https://formhero.io",
"contributions": [
"code",
"test"
]
},
{
"login": "jcollado",
"name": "Javier Collado",
"avatar_url": "https://avatars.githubusercontent.com/u/43780?v=3",
"profile": "https://github.com/jcollado",
"contributions": [
"code",
"test"
]
},
{
"login": "jamischarles",
"name": "Jamis Charles",
"avatar_url": "https://avatars.githubusercontent.com/u/606014?v=3",
"profile": "https://github.com/jamischarles",
"contributions": [
"code",
"test"
]
},
{
"login": "erquhart",
"name": "Shawn Erquhart",
"avatar_url": "https://avatars.githubusercontent.com/u/2112202?v=3",
"profile": "http://www.professant.com",
"contributions": [
"code",
"doc",
"test"
]
},
{
"login": "tusharmath",
"name": "Tushar Mathur",
"avatar_url": "https://avatars.githubusercontent.com/u/194482?v=3",
"profile": "http://tusharm.com",
"contributions": [
"code",
"test"
]
},
{
"login": "bitjson",
"name": "Jason Dreyzehner",
"avatar_url": "https://avatars.githubusercontent.com/u/904007?v=3",
"profile": "https://twitter.com/bitjson",
"contributions": [
"code",
"doc",
"test"
]
},
{
"login": "hisabimbola",
"name": "Abimbola Idowu",
"avatar_url": "https://avatars.githubusercontent.com/u/9654923?v=3",
"profile": "http://twitter.com/hisabimbola",
"contributions": [
"code"
]
},
{
"login": "bahmutov",
"name": "Gleb Bahmutov",
"avatar_url": "https://avatars.githubusercontent.com/u/2212006?v=3",
"profile": "https://glebbahmutov.com/",
"contributions": [
"code",
"test"
]
},
{
"login": "ds82",
"name": "Dennis",
"avatar_url": "https://avatars.githubusercontent.com/u/332905?v=3",
"profile": "http://dennis.io",
"contributions": [
"code"
]
},
{
"login": "mattlewis92",
"name": "Matt Lewis",
"avatar_url": "https://avatars.githubusercontent.com/u/6425649?v=3",
"profile": "https://mattlewis.me/",
"contributions": [
"code"
]
},
{
"login": "tlvince",
"name": "Tom Vincent",
"avatar_url": "https://avatars.githubusercontent.com/u/323761?v=3",
"profile": "https://tlvince.com",
"contributions": [
"code"
]
},
{
"login": "adjohnson916",
"name": "Anders D. Johnson",
"avatar_url": "https://avatars.githubusercontent.com/u/615381?v=3",
"profile": "https://andrz.me/",
"contributions": [
"code",
"doc",
"test"
]
},
{
"login": "zetlen",
"name": "James Zetlen",
"avatar_url": "https://avatars.githubusercontent.com/u/1643758?v=3",
"profile": "jameszetlen.com",
"contributions": [
"code",
"test"
]
},
{
"login": "opatut",
"name": "Paul Bienkowski",
"avatar_url": "https://avatars.githubusercontent.com/u/235784?v=3",
"profile": "http://opatut.de",
"contributions": [
"code",
"test"
]
},
{
"login": "bmds",
"name": "Barney Scott",
"avatar_url": "https://avatars.githubusercontent.com/u/324073?v=3",
"profile": "https://github.com/bmds",
"contributions": [
"code",
"test"
]
},
{
"login": "Emmurillo",
"name": "Emmanuel Murillo Sánchez",
"avatar_url": "https://avatars.githubusercontent.com/u/5572221?v=3",
"profile": "https://github.com/Emmurillo",
"contributions": [
"code",
"test"
]
},
{
"login": "Starefossen",
"name": "Hans Kristian Flaatten",
"avatar_url": "https://avatars.githubusercontent.com/u/968267?v=3",
"profile": "https://starefossen.github.io",
"contributions": [
"code",
"test"
]
}
]
}
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -10,3 +10,5 @@ nohup.out
*.ignored.*
*.ignored/
*.ignored
.opt-in
.opt-out
7 changes: 2 additions & 5 deletions .travis.yml
Expand Up @@ -9,14 +9,11 @@ branches:
notifications:
email: false
node_js:
- iojs
before_install:
- npm i -g npm@^2.0.0
- '6'
before_script:
- npm prune
script:
- npm t
- npm run check-coverage
- yarn run validate
after_success:
- npm run report-coverage
- npm run semantic-release
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,65 @@
# Contributing

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub][egghead]

## Project setup

You're going to need [`git`](https://git-scm.com/) to get the project, and [`node`](https://nodejs.org/en/) and
[`yarn`](https://yarnpkg.com/) to install dependencies and run scripts.

1. Fork and clone the repo
2. Run `yarn` to install dependencies
3. Run `yarn run validate` to validate you've got everything working
4. Create a branch for your PR

## Add yourself as a contributor

This project follows the [all contributors][all-contributors] specification. To add yourself to the table of
contributors on the README.md, please use the automated script as part of your PR:

```console
yarn run add-contributor <YOUR_GITHUB_USERNAME>
```

Follow the prompt. If you've already added yourself to the list and are making a new type of contribution, you can run
it again and select the added contribution type.

## Committing and Pushing changes

This project uses [`semantic-release`][semantic-release] to do automatic releases and generate a changelog based on the
commit history. So we follow [a convention][convention] for commit messages. Please follow this convention for your
commit messages.

You can use `commitizen` to help you to follow [the convention][convention]

Once you are ready to commit the changes, please use the below commands

1. Run `git add <files to be comitted>` to stage changed files
2. Run `yarn run commit` to start commitzen to commit those files

... and follow the instruction of the interactive prompt.

### opt into git hooks

There are git hooks set up with this project that are automatically installed when you install dependencies. They're
really handy, but are turned off by default (so as to not hinder new contributors). You can opt into these by creating
a file called `.opt-in` at the root of the project and putting this inside:

```
commitmsg
precommit
```

## Help needed

Please checkout [the issues](https://github.com/kentcdodds/validate-commit-msg/issues)! Also, please watch the repo
and respond to questions/bug reports/feature requests! Thanks!

[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[semantic-release]: https://npmjs.com/package/semantic-release
[convention]: https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
[all-contributors]: https://github.com/kentcdodds/all-contributors
[ROADMAP]: ./ROADMAP.md
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -7,9 +7,11 @@
[![downloads][downloads-badge]][npm-stat]
[![MIT License][license-badge]][LICENSE]

[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Donate][donate-badge]][donate]
[![Code of Conduct][coc-badge]][coc]

[![Watch on GitHub][github-watch-badge]][github-watch]
[![Star on GitHub][github-star-badge]][github-star]
[![Tweet][twitter-badge]][twitter]
Expand Down Expand Up @@ -110,3 +112,16 @@ pulled it out so I could re-use this same kind of thing in other projects.
[github-star]: https://github.com/kentcdodds/validate-commit-msg/stargazers
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20validate-commit-msg!%20https://github.com/kentcdodds/validate-commit-msg%20%F0%9F%91%8D
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/kentcdodds/validate-commit-msg.svg?style=social

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />💁 [💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=kentcdodds) [📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=kentcdodds) 👀 [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=kentcdodds) | [<img src="https://avatars.githubusercontent.com/u/13700?v=3" width="100px;"/><br /><sub>Remy Sharp</sub>](http://remysharp.com)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=remy) [📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=remy) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=remy) | [<img src="https://avatars.githubusercontent.com/u/1692136?v=3" width="100px;"/><br /><sub>Cédric Malard</sub>](http://valdun.net)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=cmalard) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=cmalard) | [<img src="https://avatars.githubusercontent.com/u/696693?v=3" width="100px;"/><br /><sub>Mark Dalgleish</sub>](markdalgleish.com)<br />[📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=markdalgleish) | [<img src="https://avatars.githubusercontent.com/u/1018189?v=3" width="100px;"/><br /><sub>Ryan Kimber</sub>](https://formhero.io)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=ryan-kimber) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=ryan-kimber) | [<img src="https://avatars.githubusercontent.com/u/43780?v=3" width="100px;"/><br /><sub>Javier Collado</sub>](https://github.com/jcollado)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=jcollado) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=jcollado) | [<img src="https://avatars.githubusercontent.com/u/606014?v=3" width="100px;"/><br /><sub>Jamis Charles</sub>](https://github.com/jamischarles)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=jamischarles) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=jamischarles) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars.githubusercontent.com/u/2112202?v=3" width="100px;"/><br /><sub>Shawn Erquhart</sub>](http://www.professant.com)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=erquhart) [📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=erquhart) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=erquhart) | [<img src="https://avatars.githubusercontent.com/u/194482?v=3" width="100px;"/><br /><sub>Tushar Mathur</sub>](http://tusharm.com)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=tusharmath) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=tusharmath) | [<img src="https://avatars.githubusercontent.com/u/904007?v=3" width="100px;"/><br /><sub>Jason Dreyzehner</sub>](https://twitter.com/bitjson)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=bitjson) [📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=bitjson) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=bitjson) | [<img src="https://avatars.githubusercontent.com/u/9654923?v=3" width="100px;"/><br /><sub>Abimbola Idowu</sub>](http://twitter.com/hisabimbola)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=hisabimbola) | [<img src="https://avatars.githubusercontent.com/u/2212006?v=3" width="100px;"/><br /><sub>Gleb Bahmutov</sub>](https://glebbahmutov.com/)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=bahmutov) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=bahmutov) | [<img src="https://avatars.githubusercontent.com/u/332905?v=3" width="100px;"/><br /><sub>Dennis</sub>](http://dennis.io)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=ds82) | [<img src="https://avatars.githubusercontent.com/u/6425649?v=3" width="100px;"/><br /><sub>Matt Lewis</sub>](https://mattlewis.me/)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=mattlewis92) |
| [<img src="https://avatars.githubusercontent.com/u/323761?v=3" width="100px;"/><br /><sub>Tom Vincent</sub>](https://tlvince.com)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=tlvince) | [<img src="https://avatars.githubusercontent.com/u/615381?v=3" width="100px;"/><br /><sub>Anders D. Johnson</sub>](https://andrz.me/)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=adjohnson916) [📖](https://github.com/kentcdodds/validate-commit-msg/commits?author=adjohnson916) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=adjohnson916) | [<img src="https://avatars.githubusercontent.com/u/1643758?v=3" width="100px;"/><br /><sub>James Zetlen</sub>](jameszetlen.com)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=zetlen) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=zetlen) | [<img src="https://avatars.githubusercontent.com/u/235784?v=3" width="100px;"/><br /><sub>Paul Bienkowski</sub>](http://opatut.de)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=opatut) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=opatut) | [<img src="https://avatars.githubusercontent.com/u/324073?v=3" width="100px;"/><br /><sub>Barney Scott</sub>](https://github.com/bmds)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=bmds) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=bmds) | [<img src="https://avatars.githubusercontent.com/u/5572221?v=3" width="100px;"/><br /><sub>Emmanuel Murillo Sánchez</sub>](https://github.com/Emmurillo)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=Emmurillo) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=Emmurillo) | [<img src="https://avatars.githubusercontent.com/u/968267?v=3" width="100px;"/><br /><sub>Hans Kristian Flaatten</sub>](https://starefossen.github.io)<br />[💻](https://github.com/kentcdodds/validate-commit-msg/commits?author=Starefossen) [⚠️](https://github.com/kentcdodds/validate-commit-msg/commits?author=Starefossen) |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
12 changes: 8 additions & 4 deletions package.json
Expand Up @@ -4,11 +4,16 @@
"main": "index.js",
"version": "0.0.0-development",
"scripts": {
"add-contributor": "all-contributors add",
"generate-contributors": "all-contributors generate",
"commit": "git-cz",
"commitmsg": "opt --in commitmsg --exec \"node ./index.js\"",
"precommit": "opt --in precommit --exec \"npm run validate\"",
"check-coverage": "istanbul check-coverage --statements 100 --branches 90 --functions 100 --lines 100",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"test:watch": "istanbul cover -x *.test.js _mocha -- -R spec -w index.test.js",
"test": "istanbul cover -x *.test.js _mocha -- -R spec index.test.js",
"validate": "npm t && npm run check-coverage",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"bin": {
Expand All @@ -33,20 +38,19 @@
},
"homepage": "https://github.com/kentcdodds/validate-commit-msg#readme",
"devDependencies": {
"all-contributors-cli": "3.0.7",
"chai": "3.4.1",
"codecov.io": "0.1.6",
"commitizen": "2.5.0",
"cz-conventional-changelog": "1.1.5",
"ghooks": "1.0.3",
"husky": "0.12.0",
"istanbul": "0.4.2",
"mocha": "2.3.4",
"opt-cli": "1.5.1",
"semantic-release": "4.3.5",
"sinon": "1.17.2"
},
"config": {
"ghooks": {
"commit-msg": "./index.js && npm t && npm run check-coverage"
},
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
},
Expand Down

0 comments on commit 3386784

Please sign in to comment.