Skip to content

Commit 69511c0

Browse files
committed
✨ feature: created generic commit message markdown and a helper script for it
created a markdown to reference when making commits without the cz command as well as a helper script to update the emoji and types from the gitmoji repo
1 parent b657a35 commit 69511c0

File tree

2 files changed

+206
-0
lines changed

2 files changed

+206
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* eslint-disable security/detect-object-injection */
2+
/* eslint-disable guard-for-in */
3+
/* eslint-disable no-restricted-syntax */
4+
import { get } from 'https';
5+
import { writeFile } from 'fs';
6+
7+
const url =
8+
'https://raw.github.com/jebarpg/cz-gitmoji-adapter/main/lib/types.json';
9+
10+
get(url, (res) => {
11+
let body = '';
12+
res.on('data', (chunk) => {
13+
body += chunk;
14+
});
15+
res.on('end', () => {
16+
try {
17+
const json = JSON.parse(body);
18+
19+
let content = '<details>\n <summary>Scoped</summary>\n';
20+
for (const i in json) {
21+
const emoji = json[i].emoji;
22+
const name = json[i].name;
23+
content += `${emoji} ${name}(scope):<br>\n`;
24+
}
25+
content += `</details>\n\n<details>\n <summary>No Scope</summary>\n`;
26+
for (const i in json) {
27+
const emoji = json[i].emoji;
28+
const name = json[i].name;
29+
content += `${emoji} ${name}:<br>\n`;
30+
}
31+
content += `</details>`
32+
writeFile('emojiTypesCommitMessages.txt', content, (err) => {
33+
if (err) {
34+
console.error(err);
35+
}
36+
});
37+
} catch (error) {
38+
console.error(error.message);
39+
}
40+
});
41+
}).on('error', (error) => {
42+
console.error(error.message);
43+
});
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Generic Commit Messages
2+
3+
If you are making a commit without using the `cz` commit or the `bun cm` or `bun cm2` scripts then these are handy to copy and used to format your commits with.
4+
5+
## Examples of when you would use these
6+
7+
* Doing a merge in Visual Studio Code and are prompted with VIM to enter a message.
8+
* When you need to do a manual `git commit -m ""` on the CLI.
9+
* When you are using the Visual Studio Code Source Control tab to make a commit using it's message text box.
10+
11+
## Scoped example
12+
13+
🐛 fix(scopeName): Message
14+
15+
## No Scope example
16+
17+
🐛 fix: fixing merge
18+
19+
## Emojis and Type names
20+
21+
Click the type of message you would like to use below and copy into your commit message. Remember to change teh scope to the appropriate scope of your project if you choose a scoped message.
22+
23+
<details>
24+
<summary>Scoped</summary>
25+
🎨 style(scope):<br>
26+
⚡️ perf(scope):<br>
27+
🔥 prune(scope):<br>
28+
🐛 fix(scope):<br>
29+
🚑 quickfix(scope):<br>
30+
✨ feature(scope):<br>
31+
📝 docs(scope):<br>
32+
🚀 deploy(scope):<br>
33+
💄 ui(scope):<br>
34+
🎉 init(scope):<br>
35+
✅ test(scope):<br>
36+
🔒 security(scope):<br>
37+
🔖 release(scope):<br>
38+
🚨 lint(scope):<br>
39+
🚧 wip(scope):<br>
40+
💚 fix-ci(scope):<br>
41+
⬇️ downgrade(scope):<br>
42+
⬆️ upgrade(scope):<br>
43+
📌 pushpin(scope):<br>
44+
👷 ci(scope):<br>
45+
📈 analytics(scope):<br>
46+
♻️ refactoring(scope):<br>
47+
➕ dep-add(scope):<br>
48+
➖ dep-rm(scope):<br>
49+
🔧 config(scope):<br>
50+
🌐 i18n(scope):<br>
51+
✏️ typo(scope):<br>
52+
💩 poo(scope):<br>
53+
⏪ revert(scope):<br>
54+
🔀 merge(scope):<br>
55+
📦 dep-up(scope):<br>
56+
👽 compat(scope):<br>
57+
🚚 mv(scope):<br>
58+
📄 license(scope):<br>
59+
💥 breaking(scope):<br>
60+
🍱 assets(scope):<br>
61+
♿️ access(scope):<br>
62+
💡 docs-code(scope):<br>
63+
🍻 beer(scope):<br>
64+
💬 texts(scope):<br>
65+
🗃️ db(scope):<br>
66+
🔊 log-add(scope):<br>
67+
🔇 log-rm(scope):<br>
68+
👥 contrib-add(scope):<br>
69+
🚸 ux(scope):<br>
70+
🏗️ arch(scope):<br>
71+
📱 iphone(scope):<br>
72+
🤡 clown-face(scope):<br>
73+
🥚 egg(scope):<br>
74+
🙈 see-no-evil(scope):<br>
75+
📸 camera-flash(scope):<br>
76+
⚗️ experiment(scope):<br>
77+
🔍 seo(scope):<br>
78+
🏷️ types(scope):<br>
79+
🌱 seed(scope):<br>
80+
🚩 flags(scope):<br>
81+
💫 animation(scope):<br>
82+
🗑️ wastebasket(scope):<br>
83+
🛂 passport-control(scope):<br>
84+
🩹 adhesive-bandage(scope):<br>
85+
🧐 monocle-face(scope):<br>
86+
⚰️ coffin(scope):<br>
87+
🧪 test-tube(scope):<br>
88+
👔 necktie(scope):<br>
89+
🩺 stethoscope(scope):<br>
90+
🧱 bricks(scope):<br>
91+
🧑‍💻 technologist(scope):<br>
92+
</details>
93+
94+
<details>
95+
<summary>No Scope</summary>
96+
🎨 style:<br>
97+
⚡️ perf:<br>
98+
🔥 prune:<br>
99+
🐛 fix:<br>
100+
🚑 quickfix:<br>
101+
✨ feature:<br>
102+
📝 docs:<br>
103+
🚀 deploy:<br>
104+
💄 ui:<br>
105+
🎉 init:<br>
106+
✅ test:<br>
107+
🔒 security:<br>
108+
🔖 release:<br>
109+
🚨 lint:<br>
110+
🚧 wip:<br>
111+
💚 fix-ci:<br>
112+
⬇️ downgrade:<br>
113+
⬆️ upgrade:<br>
114+
📌 pushpin:<br>
115+
👷 ci:<br>
116+
📈 analytics:<br>
117+
♻️ refactoring:<br>
118+
➕ dep-add:<br>
119+
➖ dep-rm:<br>
120+
🔧 config:<br>
121+
🌐 i18n:<br>
122+
✏️ typo:<br>
123+
💩 poo:<br>
124+
⏪ revert:<br>
125+
🔀 merge:<br>
126+
📦 dep-up:<br>
127+
👽 compat:<br>
128+
🚚 mv:<br>
129+
📄 license:<br>
130+
💥 breaking:<br>
131+
🍱 assets:<br>
132+
♿️ access:<br>
133+
💡 docs-code:<br>
134+
🍻 beer:<br>
135+
💬 texts:<br>
136+
🗃️ db:<br>
137+
🔊 log-add:<br>
138+
🔇 log-rm:<br>
139+
👥 contrib-add:<br>
140+
🚸 ux:<br>
141+
🏗️ arch:<br>
142+
📱 iphone:<br>
143+
🤡 clown-face:<br>
144+
🥚 egg:<br>
145+
🙈 see-no-evil:<br>
146+
📸 camera-flash:<br>
147+
⚗️ experiment:<br>
148+
🔍 seo:<br>
149+
🏷️ types:<br>
150+
🌱 seed:<br>
151+
🚩 flags:<br>
152+
💫 animation:<br>
153+
🗑️ wastebasket:<br>
154+
🛂 passport-control:<br>
155+
🩹 adhesive-bandage:<br>
156+
🧐 monocle-face:<br>
157+
⚰️ coffin:<br>
158+
🧪 test-tube:<br>
159+
👔 necktie:<br>
160+
🩺 stethoscope:<br>
161+
🧱 bricks:<br>
162+
🧑‍💻 technologist:<br>
163+
</details>

0 commit comments

Comments
 (0)