| name | write-pr |
| description | Generate PR title and body from commits since the base branch, then create the PR on GitHub following the project PR template exactly. |
Step 1 โ Gather Context
git branch --show-current
ํ์ฌ ๋ธ๋์น๊ฐ develop ๋๋ master์ด๋ฉด ์ฆ์ ์ค๋จ:
ํ์ฌ ๋ธ๋์น: develop
feature ๋ธ๋์น๋ฅผ ๋จผ์ ์์ฑํ์ธ์ (/new-branch)
feature ๋ธ๋์น๊ฐ ๋ง์ผ๋ฉด ๊ณ์ ์งํ:
git log origin/develop..HEAD --oneline
git diff origin/develop...HEAD --stat
git diff origin/develop...HEAD
Step 2 โ Generate PR Title
Format: ์ค๋ช
- Description: Korean, concise, no emojis, max 50 characters
- Generate 3 options and mark the best with
โ ์ถ์ฒ
Step 3 โ Generate PR Body
Fill in the following template exactly (do not change the structure):
## #๏ธโฃ์ฐ๊ด๋ ์ด์
> #์ด์๋ฒํธ
## ๐์์
๋ด์ฉ
<๋ณ๊ฒฝ ๋ด์ฉ์ ๊ตฌ์ฒด์ ์ผ๋ก ์์ฑ>
### ์คํฌ๋ฆฐ์ท (์ ํ)
## ๐ฌ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ(์ ํ)
> ๋ฆฌ๋ทฐ์ด๊ฐ ํน๋ณํ ๋ด์ฃผ์์ผ๋ฉด ํ๋ ๋ถ๋ถ์ด ์๋ค๋ฉด ์์ฑํด์ฃผ์ธ์
Rules:
- Korean
- No emojis in content (template headings already have emojis, keep them)
- Describe what was changed and why concisely
Step 4 โ Select Label
์ปค๋ฐ ๋ด์ฉ์ ๊ธฐ๋ฐ์ผ๋ก Type ๋ผ๋ฒจ 1๊ฐ๋ฅผ ์ ํํ๋ค:
| ๋ผ๋ฒจ | ์ ํ ๊ธฐ์ค |
|---|
๐ฉ Type: Feature/Function | ์ ๊ธฐ๋ฅ, API ๊ตฌํ, ์ฑ๋ฅ ๊ฐ์ |
๐ Type: Feature/Document | ๋ฌธ์, ์คํฌ, ์์ด์ ํธ, ์ค์ ํ์ผ |
๐ Type: Bug/Function | ๋ฒ๊ทธ ์์ |
Status ๋ผ๋ฒจ์ ํญ์ ๐ Status: Reviewing์ผ๋ก ๊ณ ์ .
Step 5 โ Show Preview & Confirm
## ์ถ์ฒ PR ์ ๋ชฉ
1. [title1]
2. [title2]
3. [title3] โ ์ถ์ฒ
## ๋ผ๋ฒจ
- ๐ฉ Type: Feature/Function
- ๐ Status: Reviewing
## PR ๋ณธ๋ฌธ ๋ฏธ๋ฆฌ๋ณด๊ธฐ
[body content]
Ask the user which title to use. If no response, use the recommended option.
Step 6 โ Create PR
Get the current GitHub username for assignee:
gh api user --jq .login
gh pr create \
--title "<title>" \
--base develop \
--assignee "<github-username>" \
--reviewer "team-incube/flooding-server" \
--label "<Type ๋ผ๋ฒจ>" \
--label "๐ Status: Reviewing" \
--body "$(cat <<'EOF'
## #๏ธโฃ์ฐ๊ด๋ ์ด์
> #์ด์๋ฒํธ
## ๐์์
๋ด์ฉ
<๋ด์ฉ>
### ์คํฌ๋ฆฐ์ท (์ ํ)
## ๐ฌ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ(์ ํ)
> <๋ด์ฉ ๋๋ ์์ผ๋ฉด ์์>
EOF
)"
Display the PR URL after creation.