8000 ci: document and enforce our contribution protocols (#13) · homebaseio/homebase-react@0b627e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b627e6

Browse files
ci: document and enforce our contribution protocols (#13)
1 parent 1c4f1e8 commit 0b627e6

File tree

9 files changed

+772
-59
lines changed

9 files changed

+772
-59
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname $0)/_/husky.sh"
3+
4+
yarn commitlint -e "$(git rev-parse --git-dir)/COMMIT_EDITMSG"

.husky/prepare-commit-msg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname $0)/_/husky.sh"
3+
4+
NOCOLOR='\033[0m'
5+
PURPLE='\033[1;35m'
6+
exec < /dev/tty && yarn git-cz --hook ||
7+
echo "${PURPLE}FIX: Try upgrading git, --absolute-git-dir was introduced in v2.13${NOCOLOR}" && true

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contribution guide
2+
3+
## Developing homebase-react
4+
5+
If you consider contributing changes to homebase-react – thank you!
6+
Please review these guidelines when filing a pull request:
7+
8+
- Commits follow the [Angular commit convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines)
9+
- 2 spaces indentation
10+
- Features and bug fixes should be covered by test cases
11+
12+
## Creating releases
13+
14+
homebase-react uses [semantic-release](https://github.com/semantic-release/semantic-release)
15+
to release new versions automatically on merge to master.
16+
17+
- Commits of type `fix` will trigger bugfix releases, think `0.0.1`
18+
- Commits of type `feat` will trigger feature releases, think `0.1.0`
19+
- Commits with `BREAKING CHANGE` in body or footer will trigger breaking releases, think `1.0.0`
20+
21+
All other commit types will trigger no new release.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ yarn install
179179
yarn test
180180
```
181181

182+
## Contributing
183+
184+
Welcome and thank you! Writing docs, patches and features are all incredibly helpful and appreciated.
185+
186+
We only ask that you provide test coverage for code changes, and conform to our [commit guidelines](CONTRIBUTING.md).
182187

183188
## Authors
184189

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']}

package.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"license": "MIT",
66
"homepage": "https://github.com/homebaseio/homebase-react",
77
"main": "./dist/js/homebase.react.js",
8+
"private": false,
89
"scripts": {
910
"dev": "shadow-cljs watch dev",
1011
"build": "rm -rf dist && shadow-cljs release npm",
@@ -15,7 +16,15 @@
1516
"test": "yarn test:cljs && yarn test:js",
1617
"test:dev": "yarn test:cljs && yarn test:js:dev",
1718
"report": "rm -rf dist && shadow-cljs run shadow.cljs.build-report npm report.html",
18-
"semantic-release": "semantic-release"
19+
"semantic-release": "semantic-release",
20+
"_postinstall": "husky install",
21+
"prepublish": "pinst --disable",
22+
"postpublish": "pinst --enable"
23+
},
24+
"config": {
25+
"commitizen": {
26+
"path": "./node_modules/cz-conventional-changelog"
27+
}
1928
},
2029
"peerDependencies": {
2130
"react": ">=16.8.0"
@@ -25,24 +34,30 @@
2534
"@babel/core": "7.11.6",
2635
"@babel/plugin-transform-modules-commonjs": "7.12.1",
2736
"@babel/plugin-transform-react-jsx": "7.10.4",
28-
"@semantic-release/changelog": "^5.0.1",
29-
"@semantic-release/commit-analyzer": "^8.0.1",
30-
"@semantic-release/git": "^9.0.0",
31-
"@semantic-release/github": "^7.1.1",
32-
"@semantic-release/npm": "^7.0.6",
33-
"@semantic-release/release-notes-generator": "^9.0.1",
37+
"@commitlint/cli": "^11.0.0",
38+
"@commitlint/config-conventional": "^11.0.0",
39+
"@semantic-release/changelog": "5.0.1",
40+
"@semantic-release/commit-analyzer": "8.0.1",
41+
"@semantic-release/git": "9.0.0",
42+
"@semantic-release/github": "7.1.1",
43+
"@semantic-release/npm": "7.0.6",
44+
"@semantic-release/release-notes-generator": "9.0.1",
3445
"babel-runtime": "6.26.0",
46+
"commitizen": "^4.2.2",
3547
"create-react-class": "15.6.3",
48+
"cz-conventional-changelog": "^3.3.0",
3649
"enzyme": "3.11.0",
3750
"enzyme-adapter-react-16": "1.15.5",
3851
"highlight.js": "10.2.1",
52+
"husky": "5.0.0-beta.0",
3953
"jest": "26.6.0",
4054
"marked": "1.2.0",
55+
"pinst": "2.0.0",
4156
"react": "16.14.0",
4257
"react-component-benchmark": "0.0.4",
4358
"react-dom": "16.14.0",
44-
"semantic-release": "^17.2.2",
45-
"semantic-release-cli": "^5.4.0",
59+
"semantic-release": "17.2.2",
60+
"semantic-release-cli": "5.4.0",
4661
"shadow-cljs": "2.11.4"
4762
},
4863
"keywords": [

0 commit comments

Comments
 (0)
0