Skip to content

Commit e0f09e8

Browse files
authored
docs: introduce contributing.md (#222)
1 parent 85fb320 commit e0f09e8

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

CONTRIBUTING.MD

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Contributing
2+
3+
## How we work
4+
5+
We write code and then do commits, as everyone does.
6+
7+
Our commits rely on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) system.
8+
9+
Releases are tied to the commit messages via [semantic-release](https://github.com/semantic-release/semantic-release).
10+
11+
Any commit(a PR merge) into `dev`, which is our main branch, is published to NPM under the [`@logicalclocks/quartz` package](https://www.npmjs.com/package/@logicalclocks/quartz).
12+
13+
## Commit rules
14+
15+
Basically, [Angular commit message conventions](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format).
16+
17+
18+
Below is just copy-paste:
19+
20+
21+
Each commit message consists of a **header**, a **body**, and a **footer**.
22+
23+
24+
```
25+
<header>
26+
<BLANK LINE>
27+
<body>
28+
<BLANK LINE>
29+
<footer>
30+
```
31+
32+
The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
33+
34+
The `body` is mandatory for all commits except for those of type "docs".
35+
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
36+
37+
The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
38+
39+
40+
#### <a name="commit-header"></a>Commit Message Header
41+
42+
```
43+
<type>(<scope>): <short summary>
44+
│ │ │
45+
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
46+
│ │
47+
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
48+
│ elements|forms|http|language-service|localize|platform-browser|
49+
│ platform-browser-dynamic|platform-server|router|service-worker|
50+
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
51+
│ devtools
52+
53+
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
54+
```
55+
56+
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
57+
58+
59+
#### Type
60+
Must be one of the following:
61+
62+
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
63+
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
64+
* **docs**: Documentation only changes
65+
* **feat**: A new feature
66+
* **fix**: A bug fix
67+
* **perf**: A code change that improves performance
68+
* **refactor**: A code change that neither fixes a bug nor adds a feature
69+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
70+
* **test**: Adding missing tests or correcting existing tests
71+
72+
73+
##### Scope
74+
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
75+
76+
The following is the list of supported scopes:
77+
78+
* `select2`
79+
* `file-explorer`
80+
* `button`
81+
* `storybook`
82+
83+
84+
#### The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
85+
For example:
86+
87+
```
88+
BREAKING CHANGE: <breaking change summary>
89+
<BLANK LINE>
90+
<breaking change description + migration instructions>
91+
<BLANK LINE>
92+
<BLANK LINE>
93+
Fixes #<issue number>
94+
```
95+
96+
### Examples:
97+
98+
simple:
99+
100+
```
101+
feat(select): add `searchable` prop
102+
docs: add `CONTRIBUTING.MD`
103+
ci: update npm release workflow
104+
fix(file-explorer): selection bug
105+
```
106+
107+
with **BREAKING CHANGE**(this will trigger a major version bump):
108+
```
109+
feat(select): remove `width` prop
110+
111+
BREAKING CHANGE: The `width` prop has been removed.
112+
We no longer need to specify `width` by hand.
113+
```
114+
115+
116+
## Releases:
117+
118+
- if the commit header has `feat`, we do a minor release(1.**2**.0)
119+
120+
- everything else produces a patch(1.1.**2**)
121+
122+
- if the footer has `BREAKING CHANGE`, then it's major release(**2**.0.0)

0 commit comments

Comments
 (0)