ข้อกำหนด
- +MUST จะต้องใช้ภาษาอังกฤษทั้งหมด
- -MUST ห้ามรวบทุกอย่างที่ทำอยู่ใน commit เดียว
- +SHOULD ควร commit สิ่งที่ทำภายในวันนั้นๆ
- Reference
<ประเภท>(<ขอบเขต>): <รายละเอียด>
/// หรือ
<type>(<scope>): <subject>
- ตัวอย่าง (จะต้องใช้ภาษาอังกฤษทั้งหมด)
feat: create login page
feat(login): form validation
fix: loading indicator not disappear
fix(profile): incorrect data display
refactor(utils): make variables in numeric-formatter to be more descriptive
perf: simplify/adjust the process flow
docs: update README.md
build: add antd package deps
chore: update package.json script
ops: add Dockerfile
ci: setup github action config
ประเภท Type
fix: เป็นการ Commit ที่แก้ไข bugs/issues
feat: เป็นการ Commit ที่เป็นการ เพิ่ม/ลด feature หรือ เปลี่ยนแปลงผลลัพธ์
refactor: เป็นการ Commit ที่ แก้ไข code ให้ดีขึ้น โดย ไม่ เปลี่ยนแปลงผลลัพธ์
perf: เป็นการ Commit ที่เป็นส่วนหนึ่งของ refactor แต่เจาะจงไปในส่วนที่เกี่ยวกับ performance
style: เป็นการ Commit ที่เกี่ยวกับการจัดโค้ด เช่น การเว้นวรรค, ใส่ semi-colons, หรือ อื่นๆ
test: เป็นการ Commit ที่เกี่ยวกับการ เพิ่ม/แก้ไข/ลบ test script
docs: เป็นการ Commit ที่เกี่ยวกับการเขียน documentation เท่านั้น
build: เป็นการ Commit ที่เกี่ยวกับ build tool, ci pipeline, dependencies, หรือ project version
ops: เป็นการ Commit ที่เกี่ยวกับ deployment, backup, หรือ recovery
ci: เป็นการ Commit ที่เกี่ยวกับ CI config
chore: เป็นการ Commit ในเรื่องทั่วไป ที่ส่งผลเฉพาะภายใน project เช่นการแก้ .gitignore
ขอบเขต Scope
- +OPTIONAL ระบุขอบเขตของ commit ว่าเป็นส่วนไหน
รายละเอียด Subject
- +MUST ระบุสิ่งที่ทำใน commit นั้นๆ โดยสรุป ไม่สั้นจนเกินไป