You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: add CONTRIBUTING as a template and various changes
Added types from the commit validation script to CONTRIBUTING. Added
packages names from the package script to the scope section. Added
examples of good commit messages.
Also corrected some texts.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+39-15
Original file line number
Diff line number
Diff line change
@@ -180,41 +180,65 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
180
180
### Type
181
181
Must be one of the following:
182
182
183
-
***build**: Changes that affect the build system or external dependencies
184
-
***ci**: Changes to our CI configuration files and scripts
185
-
***docs**: Documentation only changes
186
-
***feat**: A new feature
187
-
***fix**: A bug fix
188
-
***perf**: A code change that improves performance
189
-
***refactor**: A code change that neither fixes a bug nor adds a feature
190
-
***style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
191
-
***test**: Adding missing tests or correcting existing tests
183
+
***build**: Changes that affect the build system or external dependencies. [2]
184
+
***ci**: Changes to our CI configuration files and scripts. [2]
185
+
***docs**: Documentation only changes.
186
+
***feat**: A new feature. [1]
187
+
***fix**: A bug fix. [1]
188
+
***refactor**: A code change that neither fixes a bug nor adds a feature
189
+
***release**: A release commit. Must only include version changes. [2]
190
+
***revert**: A git commit revert. The description must include the original commit message. [2]
191
+
***style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
192
+
***test**: Adding missing tests or correcting existing tests.
193
+
194
+
195
+
<sup>[1] This type MUST have a scope. See the next section for more information.</sup><br/>
196
+
<sup>[2] This type MUST NOT have a scope. It only applies to general scripts and tooling.</sup>
192
197
193
198
### Scope
194
199
The scope should be the name of the npm package affected as perceived by the person reading changelog generated from the commit messages.
195
200
196
201
The following is the list of supported scopes:
197
202
198
-
***@angular-devkit/core**
203
+
***@angular/cli**
204
+
***@angular/pwa**
205
+
***@angular-devkit/architect**
206
+
***@angular-devkit/architect-cli**
207
+
***@angular-devkit/build-angular**
208
+
***@angular-devkit/build-ng-packagr**
199
209
***@angular-devkit/build-optimizer**
210
+
***@angular-devkit/build-webpack**
211
+
***@angular-devkit/core**
200
212
***@angular-devkit/schematics**
201
213
***@angular-devkit/schematics-cli**
214
+
***@ngtools/webpack**
202
215
***@schematics/angular**
203
216
***@schematics/schematics**
217
+
***@schematics/update**
204
218
205
-
There are currently a few exceptions to the "use package name" rule:
206
-
207
-
***packaging**: used forchanges that change the npm package layoutin all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
208
-
***changelog**: used forupdating the release notesin CHANGELOG.md
209
-
* none/empty string: useful for`style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
210
219
211
220
### Subject
212
221
The subject contains succinct description of the change:
213
222
214
223
* use the imperative, present tense: "change" not "changed" nor "changes"
215
224
* don't capitalize first letter
225
+
* be concise and direct
216
226
* no dot (.) at the end
217
227
228
+
### Examples
229
+
Examples of valid commit messages:
230
+
231
+
* `fix(@angular/cli): prevent the flubber from grassing`
232
+
* `refactor(@schematics/angular): move all JSON classes together`
233
+
234
+
Examples of invalid commit messages:
235
+
* `fix(@angular/cli): add a new XYZ command`
236
+
237
+
This is a feature, not a fix.
238
+
* `ci(@angular/cli): fix publishing workflow`
239
+
240
+
The `ci` type cannot have a scope.
241
+
218
242
### Body
219
243
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
220
244
The body should include the motivation for the change and contrast this with previous behavior.
0 commit comments