Skip to content

Commit c40a07b

Browse files
authored
Merge pull request #211 from derecklhw/main
Add cz-git to standard git commit msg
2 parents 1dae196 + f2cfa14 commit c40a07b

File tree

6 files changed

+2931
-6206
lines changed

6 files changed

+2931
-6206
lines changed

.commitlintrc.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// .commitlintrc.js
2+
/** @type {import('cz-git').UserConfig} */
3+
module.exports = {
4+
rules: {
5+
// @see: https://commitlint.js.org/#/reference-rules
6+
},
7+
prompt: {
8+
alias: { fd: "docs: fix typos" },
9+
messages: {
10+
type: "Select the type of change that you're committing:",
11+
scope: "Denote the SCOPE of this change (optional):",
12+
customScope: "Denote the SCOPE of this change:",
13+
subject: "Write a SHORT, IMPERATIVE tense description of the change:\n",
14+
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
15+
breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
16+
footerPrefixesSelect: "Select the ISSUES type of changeList by this change (optional):",
17+
customFooterPrefix: "Input ISSUES prefix:",
18+
footer: "List any ISSUES by this change. E.g.: #31, #34:\n",
19+
generatingByAI: 'Generating your AI commit subject...',
20+
generatedSelectByAI: 'Select suitable subject by AI generated:',
21+
confirmCommit: "Are you sure you want to proceed with the commit above?"
22+
},
23+
types: [
24+
{ value: "feat", name: "feat: ✨ A new feature", emoji: ":sparkles:" },
25+
{ value: "fix", name: "fix: 🐛 A bug fix", emoji: ":bug:" },
26+
{ value: "docs", name: "docs: 📝 Documentation only changes", emoji: ":memo:" },
27+
{ value: "style", name: "style: 💄 Changes that do not affect the meaning of the code", emoji: ":lipstick:" },
28+
{ value: "refactor", name: "refactor: ♻️ A code change that neither fixes a bug nor adds a feature", emoji: ":recycle:" },
29+
{ value: "perf", name: "perf: ⚡️ A code change that improves performance", emoji: ":zap:" },
30+
{ value: "test", name: "test: ✅ Adding missing tests or correcting existing tests", emoji: ":white_check_mark:" },
31+
{ value: "build", name: "build: 📦️ Changes that affect the build system or external dependencies", emoji: ":package:" },
32+
{ value: "ci", name: "ci: 🎡 Changes to our CI configuration files and scripts", emoji: ":ferris_wheel:" },
33+
{ value: "chore", name: "chore: 🔨 Other changes that don't modify src or test files", emoji: ":hammer:" },
34+
{ value: "revert", name: "revert: ⏪️ Reverts a previous commit", emoji: ":rewind:" }
35+
],
36+
useEmoji: false,
37+
emojiAlign: "center",
38+
useAI: false,
39+
aiNumber: 1,
40+
themeColorCode: "",
41+
scopes: [],
42+
allowCustomScopes: true,
43+
allowEmptyScopes: true,
44+
customScopesAlign: "bottom",
45+
customScopesAlias: "custom",
46+
emptyScopesAlias: "empty",
47+
upperCaseSubject: false,
48+
markBreakingChangeMode: false,
49+
allowBreakingChanges: ['feat', 'fix'],
50+
breaklineNumber: 100,
51+
breaklineChar: "|",
52+
skipQuestions: [],
53+
issuePrefixes: [{ value: "closed", name: "closed: ISSUES has been processed" }],
54+
customIssuePrefixAlign: "top",
55+
emptyIssuePrefixAlias: "skip",
56+
customIssuePrefixAlias: "custom",
57+
allowCustomIssuePrefix: true,
58+
allowEmptyIssuePrefix: true,
59+
confirmColorize: true,
60+
scopeOverrides: undefined,
61+
defaultBody: "",
62+
defaultIssues: "",
63+
defaultScope: "",
64+
defaultSubject: ""
65+
}
66+
};

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
"scripts": {
66
"astro": "pnpm --filter @frontend.mu/astro",
77
"nuxt": "pnpm --filter @frontend.mu/nuxt",
8-
"data": "pnpm --filter @frontend.mu/data"
8+
"data": "pnpm --filter @frontend.mu/data",
9+
"commit": "cz"
10+
},
11+
"config": {
12+
"commitizen": {
13+
"path": "node_modules/cz-git"
14+
}
915
},
1016
"keywords": [],
1117
"author": "",
1218
"license": "ISC",
13-
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
14-
}
19+
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771",
20+
"devDependencies": {
21+
"@commitlint/cli": "^19.4.0",
22+
"commitizen": "^4.3.0",
23+
"cz-git": "^1.9.4"
24+
}
25+
}

packages/frontendmu-astro/src/data/contributors.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"username": "MrSunshyne",
4-
"contributions": 633
4+
"contributions": 643
55
},
66
{
77
"username": "houzyk",
@@ -27,6 +27,10 @@
2727
"username": "derecklhw",
2828
"contributions": 18
2929
},
30+
{
31+
"username": "k3ii",
32+
"contributions": 16
33+
},
3034
{
3135
"username": "cedpoilly",
3236
"contributions": 13
@@ -39,10 +43,6 @@
3943
"username": "Aurazor",
4044
"contributions": 12
4145
},
42-
{
43-
"username": "k3ii",
44-
"contributions": 11
45-
},
4646
{
4747
"username": "github-actions[bot]",
4848
"contributions": 9

packages/frontendmu-data/data/contributors.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"username": "MrSunshyne",
4-
"contributions": 633
4+
"contributions": 643
55
},
66
{
77
"username": "houzyk",
@@ -27,6 +27,10 @@
2727
"username": "derecklhw",
2828
"contributions": 18
2929
},
30+
{
31+
"username": "k3ii",
32+
"contributions": 16
33+
},
3034
{
3135
"username": "cedpoilly",
3236
"contributions": 13
@@ -39,10 +43,6 @@
3943
"username": "Aurazor",
4044
"contributions": 12
4145
},
42-
{
43-
"username": "k3ii",
44-
"contributions": 11
45-
},
4646
{
4747
"username": "github-actions[bot]",
4848
"contributions": 9

packages/frontendmu-data/package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@
66
"build": "node ./scripts/pre-run",
77
"update-contributors": "node ./scripts/update-contributors.js"
88
},
9-
"dependencies": {
10-
"@nuxtjs/color-mode": "^3.3.3",
11-
"nuxt": "^3.11.2",
12-
"vue": "^3.4.21",
13-
"vue-router": "^4.3.0"
14-
},
159
"devDependencies": {
16-
"@nuxtjs/tailwindcss": "^6.12.0",
17-
"nuxt-icon": "^0.6.10"
10+
"@directus/sdk": "^13.0.2"
1811
}
1912
}

0 commit comments

Comments
 (0)