Skip to content

Commit f1b92b1

Browse files
authored
docs(docs-infra): update commit message guidelines (#311)
1 parent 4e013a3 commit f1b92b1

1 file changed

Lines changed: 45 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,40 @@ make test
160160

161161
## Commit Message Conventions
162162

163-
We follow conventional commit messages to maintain a clear project history:
163+
We follow Angular's [Commit Message Guidelines][] to maintain a clear project history:
164+
165+
[Commit Message Guidelines]: https://github.com/angular/angular/blob/20.3.0/CONTRIBUTING.md#commit
164166

165167
### Format
166168
```
167169
<type>(<scope>): <description>
168-
170+
<BLANK LINE>
169171
[optional body]
170-
172+
<BLANK LINE>
171173
[optional footer(s)]
172174
```
173175

176+
The header(`<type>(<scope>): <description>`) is mandatory and the scope of the header is optional.
177+
178+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
179+
180+
The footer should contain a closing reference to an issue if any.
181+
182+
```
183+
<type>(<scope>): <short summary>
184+
│ │ │
185+
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
186+
│ │
187+
│ └─⫸ Commit Scope: common|runtime|renderer|parser|graphics|input|network|xr|
188+
│ client|bindings|web-content|elements|layout|dom|css|html|canvas|
189+
│ animations|window|media|scripting|webxr|webgl|
190+
│ changelog|website|tests|examples|docs-infra|
191+
| browser|android|darwin|
192+
│ inspector|devtools
193+
194+
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
195+
```
196+
174197
### Types
175198
- `feat`: A new feature
176199
- `fix`: A bug fix
@@ -183,16 +206,35 @@ We follow conventional commit messages to maintain a clear project history:
183206
- `ci`: Changes to CI configuration files and scripts
184207

185208
### Examples
209+
210+
The following are **good** commit message examples:
211+
212+
```bash
213+
docs(changelog): update changelog to beta.5
214+
```
215+
186216
```bash
187217
feat(webxr): add hand tracking support for spatial interactions
218+
```
188219

220+
```bash
189221
fix(rendering): resolve memory leak in texture management
222+
```
190223

224+
```bash
191225
docs(contributing): add comprehensive development guidelines
226+
```
192227

228+
```bash
193229
test(dom): add unit tests for HTML element creation
194230
```
195231

232+
```bash
233+
fix(release): need to depend on latest rxjs and zone.js
234+
235+
The version in our package.json gets copied to the one we publish, and users need the latest of these.
236+
```
237+
196238
## Pull Request Process
197239

198240
### Before Submitting

0 commit comments

Comments
 (0)