-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): improve PR submission process
Add cz-customizable to restrict scopes Add a prepush hook with husky
- Loading branch information
Showing
4 changed files
with
137 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
module.exports = { | ||
types: [ | ||
{ value: 'feat', name: 'feat: A new feature' }, | ||
{ value: 'fix', name: 'fix: A bug fix' }, | ||
{ value: 'docs', name: 'docs: Documentation only changes' }, | ||
{ | ||
value: 'cleanup', | ||
name: | ||
'cleanup: A code change that neither fixes a bug nor adds a feature' | ||
}, | ||
{ | ||
value: 'chore', | ||
name: "chore: Other changes that don't modify src or test files" | ||
} | ||
], | ||
|
||
scopes: [ | ||
{ name: 'angular', description: 'anything Angular specific' }, | ||
{ name: 'bazel', description: 'anything Bazel specific' }, | ||
{ name: 'core', description: 'anything Nx core specific' }, | ||
{ name: 'docs', description: 'anything related to docs infrastructure' }, | ||
{ name: 'nextjs', description: 'anything Next specific' }, | ||
{ name: 'node', description: 'anything Node specific' }, | ||
{ name: 'react', description: 'anything React specific' }, | ||
{ name: 'storybook', description: 'anything Storybook specific' }, | ||
{ | ||
name: 'testing', | ||
description: 'anything testing specific (e.g., jest or cypress)' | ||
}, | ||
{ | ||
name: 'repo', | ||
description: 'anything related to managing the repo itself' | ||
}, | ||
{ name: 'misc', description: 'misc stuff' } | ||
], | ||
|
||
allowTicketNumber: true, | ||
isTicketNumberRequired: false, | ||
ticketNumberPrefix: 'TICKET-', | ||
ticketNumberRegExp: '\\d{1,5}', | ||
|
||
// it needs to match the value for field type. Eg.: 'fix' | ||
/* | ||
scopeOverrides: { | ||
fix: [ | ||
{name: 'merge'}, | ||
{name: 'style'}, | ||
{name: 'e2eTest'}, | ||
{name: 'unitTest'} | ||
] | ||
}, | ||
*/ | ||
// override the messages, defaults are as follows | ||
messages: { | ||
type: "Select the type of change that you're committing:", | ||
scope: '\nDenote the SCOPE of this change (optional):', | ||
// used if allowCustomScopes is true | ||
customScope: 'Denote the SCOPE of this change:', | ||
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n', | ||
body: | ||
'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', | ||
breaking: 'List any BREAKING CHANGES (optional):\n', | ||
footer: | ||
'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n', | ||
confirmCommit: 'Are you sure you want to proceed with the commit above?' | ||
}, | ||
|
||
allowCustomScopes: false, | ||
allowBreakingChanges: ['feat', 'fix'], | ||
// skip any questions you want | ||
skipQuestions: [], | ||
|
||
// limit subject length | ||
subjectLimit: 100 | ||
// breaklineChar: '|', // It is supported for fields body and footer. | ||
// footerPrefix : 'ISSUES CLOSED:' | ||
// askForBreakingChangeFirst : true, // default is false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6772,6 +6772,18 @@ cz-conventional-changelog@^3.0.2: | |
optionalDependencies: | ||
"@commitlint/load" ">6.1.1" | ||
|
||
cz-customizable@^6.2.0: | ||
version "6.2.0" | ||
resolved "https://registry.yarnpkg.com/cz-customizable/-/cz-customizable-6.2.0.tgz#4591bef5eae9fcef44bf024259723979404cdee0" | ||
integrity sha512-6fBA8pbwApTY20Q5aDkWgJcg5wCmbwlcnccUFyBQypN8AoRJ0Vt4pLehai0/P2Xr29t2UDYoNGOUDhi4eoR0JQ== | ||
dependencies: | ||
editor "1.0.0" | ||
find-config "^1.0.0" | ||
inquirer "^6.3.1" | ||
lodash "^4.17.11" | ||
temp "^0.9.0" | ||
word-wrap "^1.2.3" | ||
|
||
d@1, d@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" | ||
|
@@ -7388,6 +7400,11 @@ ecc-jsbn@~0.1.1: | |
jsbn "~0.1.0" | ||
safer-buffer "^2.1.0" | ||
|
||
[email protected]: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" | ||
integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= | ||
|
||
[email protected]: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" | ||
|
@@ -8393,6 +8410,13 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: | |
make-dir "^2.0.0" | ||
pkg-dir "^3.0.0" | ||
|
||
find-config@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/find-config/-/find-config-1.0.0.tgz#eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530" | ||
integrity sha1-6vorm8B/qckOmgw++c7PHMgA9TA= | ||
dependencies: | ||
user-home "^2.0.0" | ||
|
||
[email protected]: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-2.0.0.tgz#5db1fb9e668a3d451db3d618cd167cdd59e41b69" | ||
|
@@ -9595,19 +9619,19 @@ humanize-ms@^1.2.1: | |
ms "^2.0.0" | ||
|
||
husky@^3.0.3: | ||
version "3.0.5" | ||
resolved "https://registry.yarnpkg.com/husky/-/husky-3.0.5.tgz#d7db27c346645a8dc52df02aa534a377ad7925e0" | ||
integrity sha512-cKd09Jy9cDyNIvAdN2QQAP/oA21sle4FWXjIMDttailpLAYZuBE7WaPmhrkj+afS8Sj9isghAtFvWSQ0JiwOHg== | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" | ||
integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== | ||
dependencies: | ||
chalk "^2.4.2" | ||
ci-info "^2.0.0" | ||
cosmiconfig "^5.2.1" | ||
execa "^1.0.0" | ||
get-stdin "^7.0.0" | ||
is-ci "^2.0.0" | ||
opencollective-postinstall "^2.0.2" | ||
pkg-dir "^4.2.0" | ||
please-upgrade-node "^3.2.0" | ||
read-pkg "^5.1.1" | ||
read-pkg "^5.2.0" | ||
run-node "^1.0.0" | ||
slash "^3.0.0" | ||
|
||
|
@@ -9856,7 +9880,7 @@ [email protected]: | |
strip-ansi "^5.1.0" | ||
through "^2.3.6" | ||
|
||
inquirer@^6.2.0, inquirer@^6.4.1: | ||
inquirer@^6.2.0, inquirer@^6.3.1, inquirer@^6.4.1: | ||
version "6.5.2" | ||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" | ||
integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== | ||
|
@@ -15030,7 +15054,7 @@ read-pkg@^3.0.0: | |
normalize-package-data "^2.3.2" | ||
path-type "^3.0.0" | ||
|
||
read-pkg@^5.0.0, read-pkg@^5.1.1: | ||
read-pkg@^5.0.0, read-pkg@^5.2.0: | ||
version "5.2.0" | ||
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" | ||
integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== | ||
|
@@ -15625,7 +15649,7 @@ right-pad@^1.0.1: | |
resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0" | ||
integrity sha1-jKCMLLtbVedNr6lr9/0aJ9VoyNA= | ||
|
||
[email protected]: | ||
[email protected], rimraf@~2.6.2: | ||
version "2.6.3" | ||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" | ||
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== | ||
|
@@ -17127,6 +17151,13 @@ telejson@^3.0.2: | |
lodash "^4.17.15" | ||
memoizerific "^1.11.3" | ||
|
||
temp@^0.9.0: | ||
version "0.9.1" | ||
resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.1.tgz#2d666114fafa26966cd4065996d7ceedd4dd4697" | ||
integrity sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA== | ||
dependencies: | ||
rimraf "~2.6.2" | ||
|
||
tempfile@^1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" | ||
|
@@ -17922,6 +17953,13 @@ use@^3.1.0: | |
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" | ||
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== | ||
|
||
user-home@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" | ||
integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= | ||
dependencies: | ||
os-homedir "^1.0.0" | ||
|
||
[email protected]: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" | ||
|
@@ -18525,7 +18563,7 @@ windows-release@^3.1.0: | |
dependencies: | ||
execa "^1.0.0" | ||
|
||
word-wrap@^1.0.3: | ||
word-wrap@^1.0.3, word-wrap@^1.2.3: | ||
version "1.2.3" | ||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" | ||
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== | ||
|