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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-155Lines changed: 6 additions & 155 deletions
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
103
103
104
104
8. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
105
105
106
-
9. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit).
106
+
9. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
107
107
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
108
108
109
109
```shell
@@ -145,7 +145,7 @@ That's it! Thank you for your contribution!
145
145
146
146
##### Updating the commit message
147
147
148
-
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines](#commit)).
148
+
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines][commit-message-guidelines]).
149
149
In order to update the commit message of the last commit on your branch:
150
150
151
151
1. Check out your branch:
@@ -210,163 +210,14 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
210
210
An automated formatter is available, see [DEVELOPER.md](contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
211
211
212
212
213
-
## <a name="commit"></a> Commit Message Format
214
-
215
-
*This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].*
216
-
217
-
We have very precise rules over how our Git commit messages must be formatted.
218
-
This format leads to **easier to read commit history**.
219
-
220
-
Each commit message consists of a **header**, a **body**, and a **footer**.
221
-
222
-
223
-
```
224
-
<header>
225
-
<BLANK LINE>
226
-
<body>
227
-
<BLANK LINE>
228
-
<footer>
229
-
```
230
-
231
-
The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
232
-
233
-
The `body` is mandatory for all commits except for those of type "docs".
234
-
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
235
-
236
-
The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
256
-
257
-
258
-
##### Type
259
-
260
-
Must be one of the following:
261
-
262
-
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
263
-
* **ci**: Changes to our CI configuration files and scripts (examples: Github Actions, SauceLabs)
264
-
* **docs**: Documentation only changes
265
-
* **feat**: A new feature
266
-
* **fix**: A bug fix
267
-
* **perf**: A code change that improves performance
268
-
* **refactor**: A code change that neither fixes a bug nor adds a feature
269
-
* **test**: Adding missing tests or correcting existing tests
270
-
271
-
272
-
##### Scope
273
-
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
274
-
275
-
The following is the list of supported scopes:
276
-
277
-
* `animations`
278
-
* `bazel`
279
-
* `benchpress`
280
-
* `common`
281
-
* `compiler`
282
-
* `compiler-cli`
283
-
* `core`
284
-
* `elements`
285
-
* `forms`
286
-
* `http`
287
-
* `language-service`
288
-
* `localize`
289
-
* `platform-browser`
290
-
* `platform-browser-dynamic`
291
-
* `platform-server`
292
-
* `router`
293
-
* `service-worker`
294
-
* `upgrade`
295
-
* `zone.js`
296
-
297
-
There are currently a few exceptions to the "use package name" rule:
298
-
299
-
* `packaging`: used for changes that change the npm package layout in 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.
300
-
301
-
* `changelog`: used for updating the release notes in CHANGELOG.md
302
-
303
-
* `dev-infra`: used for dev-infra related changes within the directories /scripts and /tools
304
-
305
-
* `docs-infra`: used for docs-app (angular.dev) related changes within the /adev directory of the repo
306
-
307
-
* `migrations`: used for changes to the `ng update` migrations.
308
-
309
-
* `devtools`: used for changes in the [browser extension](./devtools/README.md).
310
-
311
-
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
312
-
313
-
314
-
##### Summary
315
-
316
-
Use the summary field to provide a succinct description of the change:
317
-
318
-
* use the imperative, present tense: "change" not "changed" nor "changes"
319
-
* don't capitalize the first letter
320
-
* no dot (.) at the end
321
-
322
-
323
-
#### <a name="commit-body"></a>Commit Message Body
324
-
325
-
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
326
-
327
-
Explain the motivation forthe changein the commit message body. This commit message should explain _why_ you are making the change.
328
-
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
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.
Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
357
-
358
-
Similarly, a Deprecation section should start with `DEPRECATED: ` followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
359
-
360
-
361
-
### Revert commits
362
-
363
-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
364
-
365
-
The content of the commit message body should contain:
366
-
367
-
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
368
-
- a clear description of the reason for reverting the commit message.
369
-
220
+
See [Commit Message Guidelines][commit-message-guidelines].
370
221
371
222
## <a name="cla"></a> Signing the CLA
372
223
@@ -390,9 +241,9 @@ The following documents can help you sort out issues with GitHub accounts and mu
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
44
+
45
+
46
+
### Type
47
+
48
+
Must be one of the following:
49
+
50
+
***build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
51
+
***ci**: Changes to our CI configuration files and scripts (examples: Github Actions, SauceLabs)
52
+
***docs**: Documentation only changes
53
+
***feat**: A new feature
54
+
***fix**: A bug fix
55
+
***perf**: A code change that improves performance
56
+
***refactor**: A code change that neither fixes a bug nor adds a feature
57
+
***test**: Adding missing tests or correcting existing tests
58
+
59
+
60
+
### Scope
61
+
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
62
+
63
+
The following is the list of supported scopes:
64
+
65
+
*`animations`
66
+
*`bazel`
67
+
*`benchpress`
68
+
*`common`
69
+
*`compiler`
70
+
*`compiler-cli`
71
+
*`core`
72
+
*`elements`
73
+
*`forms`
74
+
*`http`
75
+
*`language-service`
76
+
*`localize`
77
+
*`platform-browser`
78
+
*`platform-browser-dynamic`
79
+
*`platform-server`
80
+
*`router`
81
+
*`service-worker`
82
+
*`upgrade`
83
+
*`zone.js`
84
+
85
+
There are currently a few exceptions to the "use package name" rule:
86
+
87
+
*`packaging`: used for changes that change the npm package layout in 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.
88
+
89
+
*`changelog`: used for updating the release notes in CHANGELOG.md
90
+
91
+
*`dev-infra`: used for dev-infra related changes within the directories /scripts and /tools
92
+
93
+
*`docs-infra`: used for docs-app (angular.dev) related changes within the /adev directory of the repo
94
+
95
+
*`migrations`: used for changes to the `ng update` migrations.
96
+
97
+
*`devtools`: used for changes in the [browser extension](../devtools/README.md).
98
+
99
+
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
100
+
101
+
102
+
### Summary
103
+
104
+
Use the summary field to provide a succinct description of the change:
105
+
106
+
* use the imperative, present tense: "change" not "changed" nor "changes"
107
+
* don't capitalize the first letter
108
+
* no dot (.) at the end
109
+
110
+
111
+
## <aname="commit-body"></a>Commit Message Body
112
+
113
+
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
114
+
115
+
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
116
+
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
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.
Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
145
+
146
+
Similarly, a Deprecation section should start with `DEPRECATED: ` followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
147
+
148
+
149
+
## Revert commits
150
+
151
+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
152
+
153
+
The content of the commit message body should contain:
154
+
155
+
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
156
+
- a clear description of the reason for reverting the commit message.
0 commit comments