Skip to content

Commit c9b7a1a

Browse files
Restore commit messages on failures (#20707)
* build: add local ng-dev.user files to gitignore Allow for ng-dev.user local configuration to be established in individual's repos. * build: enable restoration of commit messages after failure When a commit message fails during validation, saves the commit message draft and restores it on the next commit message attempt.
1 parent b7cfe67 commit c9b7a1a

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ testem.log
4040
/.firebase
4141
/.bazelrc.user
4242
*.log
43+
.ng-dev.user*

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@angular/bazel": "^10.1.0",
7676
"@angular/benchpress": "0.2.1",
7777
"@angular/compiler-cli": "^10.1.0",
78-
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#0364a68f33191747a0bb7580e44a9ad6d50add10",
78+
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#ddd71a787887dac21df25d904139d2227dba2456",
7979
"@angular/platform-browser-dynamic": "^10.1.0",
8080
"@angular/platform-server": "^10.1.0",
8181
"@angular/router": "^10.1.0",
@@ -180,7 +180,8 @@
180180
},
181181
"husky": {
182182
"hooks": {
183-
"commit-msg": "yarn -s ng-dev commit-message pre-commit-validate --file-env-variable HUSKY_GIT_PARAMS"
183+
"commit-msg": "yarn -s ng-dev commit-message pre-commit-validate --file-env-variable HUSKY_GIT_PARAMS",
184+
"prepare-commit-msg": "yarn -s ng-dev commit-message restore-commit-message-draft --file-env-variable HUSKY_GIT_PARAMS"
184185
}
185186
}
186187
}

yarn.lock

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@
117117
dependencies:
118118
tslib "^1.9.0"
119119

120-
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#0364a68f33191747a0bb7580e44a9ad6d50add10":
120+
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#ddd71a787887dac21df25d904139d2227dba2456":
121121
version "0.0.0"
122-
resolved "https://github.com/angular/dev-infra-private-builds.git#0364a68f33191747a0bb7580e44a9ad6d50add10"
122+
resolved "https://github.com/angular/dev-infra-private-builds.git#ddd71a787887dac21df25d904139d2227dba2456"
123123
dependencies:
124124
"@angular/benchpress" "0.2.1"
125125
"@bazel/buildifier" "^0.29.0"
@@ -137,6 +137,7 @@
137137
multimatch "^4.0.0"
138138
node-fetch "^2.6.0"
139139
node-uuid "1.4.8"
140+
ora "^5.0.0"
140141
protractor "^5.4.2"
141142
selenium-webdriver "3.5.0"
142143
semver "^6.3.0"
@@ -3143,6 +3144,11 @@ cli-spinners@^2.0.0, cli-spinners@^2.2.0:
31433144
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77"
31443145
integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==
31453146

3147+
cli-spinners@^2.4.0:
3148+
version "2.4.0"
3149+
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f"
3150+
integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
3151+
31463152
cli-table@^0.3.1:
31473153
version "0.3.1"
31483154
resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23"
@@ -8892,6 +8898,20 @@ ora@^3.0.0, ora@^3.4.0:
88928898
strip-ansi "^5.2.0"
88938899
wcwidth "^1.0.1"
88948900

8901+
ora@^5.0.0:
8902+
version "5.1.0"
8903+
resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8"
8904+
integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==
8905+
dependencies:
8906+
chalk "^4.1.0"
8907+
cli-cursor "^3.1.0"
8908+
cli-spinners "^2.4.0"
8909+
is-interactive "^1.0.0"
8910+
log-symbols "^4.0.0"
8911+
mute-stream "0.0.8"
8912+
strip-ansi "^6.0.0"
8913+
wcwidth "^1.0.1"
8914+
88958915
orchestrator@^0.3.0:
88968916
version "0.3.8"
88978917
resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"

0 commit comments

Comments
 (0)