ข้ามไปยังเนื้อหา

Branch & PR Naming Convention

[type]/[short-description]
Typeใช้เมื่อตัวอย่าง
feature/พัฒนาฟีเจอร์ใหม่feature/user-registration
bugfix/แก้บัคbugfix/BUG-012-submit-button
hotfix/แก้ไขเร่งด่วน (production)hotfix/fix-login-crash
test/เพิ่ม testtest/add-auth-unit-tests
refactor/refactor coderefactor/cleanup-api-routes

[TYPE] คำอธิบายสั้นๆ
PR Titleอธิบาย
[FEATURE] เพิ่มระบบสมัครสมาชิกฟีเจอร์ใหม่
[BUGFIX] BUG-012: แก้ปุ่ม Submit ไม่ทำงานแก้บัค
[HOTFIX] แก้ login crash บน productionแก้ไขเร่งด่วน
[TEST] เพิ่ม unit test สำหรับ auth moduleเพิ่ม test
[REFACTOR] ปรับปรุง API route structurerefactor

[type]: คำอธิบาย
feat: เพิ่มฟอร์มสมัครสมาชิก
fix: แก้ปุ่ม submit ไม่ทำงาน (BUG-012)
test: เพิ่ม unit test สำหรับ registration
refactor: ปรับปรุง error handling ใน API
docs: อัพเดท plan.md เพิ่ม API specs

main (production)
└── feature/user-registration
├── commit: feat: เพิ่มฟอร์ม registration
├── commit: test: เพิ่ม unit test
└── commit: fix: แก้ validation error
→ PR → Review → Merge to main
  1. สร้าง branch จาก main
  2. พัฒนา และ commit บ่อยๆ
  3. สร้าง PR ตาม เทมเพลต PR
  4. Review (DEV review สำหรับ PR ของ INTERN)
  5. Merge เข้า main (squash merge)