feat: add AI code review documentation, demonstration project, and update guidelines
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tùy chọn: tạo git repo + branch có diff để demo /code-review trên PR thật
|
||||
set -e
|
||||
git init -q && git add . && git commit -qm "base: order service"
|
||||
git checkout -qb feature/cancel-order
|
||||
cat >> src/services/orderService.js << 'JS'
|
||||
|
||||
function toMoney(n) {
|
||||
return n.toLocaleString('vi-VN') + ' đ';
|
||||
}
|
||||
|
||||
export async function cancelOrder(id) {
|
||||
const order = await getOrder(id);
|
||||
order.status = 'cancelled';
|
||||
await db.orders.save(order);
|
||||
return `Đã hủy đơn. Hoàn ${toMoney(order.total)}`;
|
||||
}
|
||||
JS
|
||||
git add . && git commit -qm "feat: thêm cancelOrder"
|
||||
echo "Xong. 'git diff main' để xem diff, hoặc push lên GitHub tạo PR rồi chạy /code-review."
|
||||
Reference in New Issue
Block a user