1
0
mirror of synced 2025-11-06 04:30:40 +08:00

chore(ci): added git-conventional-commits

This commit is contained in:
Jamie Peabody
2021-11-21 11:00:15 +00:00
parent ca1df3e4d4
commit a92b408ce5
3 changed files with 48 additions and 1 deletions

3
.git-hooks/commit-msg Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
npx git-conventional-commits commit-msg-hook "$1"

View File

@@ -0,0 +1,42 @@
{
"convention" : {
"commitTypes": [
"feat",
"fix",
"perf",
"refactor",
"style",
"test",
"build",
"ops",
"docs",
"chore",
"merge",
"revert"
],
"commitScopes": [],
"releaseTagGlobPattern": "v[0-9].*",
"issueRegexPattern": "(^|\\s)#\\d+(\\s|$)"
},
"changelog" : {
"commitTypes": [
"feat",
"fix",
"perf",
"merge"
],
"commitIgnoreRegexPattern": "^WIP ",
"headlines": {
"feat": "Features",
"fix": "Bug Fixes",
"perf": "Performance Improvements",
"merge": "Merged Branches",
"breakingChange": "BREAKING CHANGES"
},
"commitUrl": "https://github.com/wickedest/Mergely/commit/%commit%",
"commitRangeUrl": "https://github.com/wickedest/Mergely/compare/%from%...%to%?diff=split",
"issueUrl": "https://github.com/wickedest/Mergely/issues/%issue%"
}
}

View File

@@ -44,6 +44,7 @@
"copy-webpack-plugin": "^6.2.1",
"css-loader": "^5.0.0",
"file-loader": "^6.1.1",
"git-conventional-commits": "^1.1.0",
"html-webpack-plugin": "^4.5.0",
"image-webpack-loader": "^7.0.1",
"jquery": "^3.5.1",
@@ -61,7 +62,8 @@
"webpack-dev-server": "^3.11.0"
},
"scripts": {
"build": "rm -rf lib && webpack --config ./webpack.prod.js",
"build": "npm run test && npm run build:dist",
"build:dist": "rm -rf lib && webpack --config ./webpack.prod.js",
"start": "webpack serve --config webpack.dev.js",
"test": "karma start",
"test:chrome": "karma start --browsers Chrome --singleRun=false"