Pull Request ဖွင့်ခြင်းနဲ့ Code Review

Pull Request ဆိုတာ branch တစ်ခုက changes တွေကို နောက် branch တစ်ခုထဲ ပေါင်းဖို့ တင်ပြတာပါ။ Team က မပေါင်းခင် ဘာတွေပြင်ထားလဲ ကြည့်နိုင်တယ်၊ checks တွေ စစ်နိုင်တယ်၊ ပြင်သင့်တာတွေ ဆွေးနွေးနိုင်ပါတယ်။

ဒီစာမျက်နှာမှာ

Feature Branch မှာ Commit လုပ်ပြီး Push တင်ခြင်း

project-notes ထဲမှာ commit လုပ်စရာ မကျန်တော့တဲ့ အခြေအနေကနေ စပါ။ main က origin/main ကို track လုပ်ထားရပါမယ်။ ပြင်ဆင်ချက်တစ်ခုအတွက် branch ခွဲ၊ checklist ထည့်၊ ပြီးရင် branch ကို GitHub ပေါ် push လုပ်ပါ။ နမူနာကို Git Bash၊ macOS ဒါမှမဟုတ် Linux မှာ run ပါ။ CHECKLIST.md ကို editor နဲ့လည်း ဆောက်နိုင်ပါတယ်။

git switch main
git pull --ff-only
git switch -c add-checklist
printf '# Project Checklist\n- [ ] Review the README\n' > CHECKLIST.md
git add CHECKLIST.md
git commit -m "Add project checklist"
git push -u origin add-checklist

Base နဲ့ Compare Branch ရွေးခြင်း

GitHub ရဲ့ Pull requests tab မှာ New pull request ကို ရွေးပါ။ Base က changes လက်ခံမယ့် branch ပါ။ Compare က changes ပါတဲ့ branch ပါ။ Diff ကို စစ်ပြီး title ရေးပါ။ Description ထဲမှာ ဘာပြင်ထားလဲ၊ ဘယ်လို စစ်ထားလဲ ရေးပါ။

Base: main
Compare: add-checklist
Title: Add project checklist
Description: Adds CHECKLIST.md. Verified the Markdown preview.

Review အတိုင်း ပြင်ပြီး Merge ပြီးတဲ့ main ကို Update လုပ်ခြင်း

Files changed နဲ့ လိုအပ်တဲ့ review၊ automated checks တွေကို ကြည့်ပါ။ Reviewer ပြောတာ ပြင်ချင်ရင် add-checklist ပေါ်မှာပဲ commit အသစ်လုပ်ပြီး ထပ် push ပါ။ ဖွင့်ထားတဲ့ Pull Request မှာ အလိုအလျောက် update ဖြစ်ပါတယ်။ GitHub မှာ approve လုပ်ပြီး merge ပြီးတဲ့အခါ Local main ကို update လုပ်ပါ။

git switch main
git pull --ff-only
git log --oneline -5

တရားဝင် ကိုးကားချက်များ