| name | create-pr |
| description | Prepare and create PR to develop branch. Use when pushing changes and creating a pull request. |
Create Pull Request
Prepare and create PR to develop branch.
Pre-check
- If current branch is
develop or main, warn and STOP
- This project uses GitHub exclusively via
gh CLI
Steps
1. Update develop & merge into current branch
CURRENT_BRANCH=$(git branch --show-current)
git fetch origin develop
git merge origin/develop --no-edit
2. Push
git push origin HEAD
- On failure, print error and STOP
3. Create PR
3-1. Generate PR title and body
Analyze commit history and diff, then compose in this format:
Title: <TICKET>: <type>(<scope>): <subject>
Body:
## Summary
๋ณ๊ฒฝ์ ๋ชฉ์ ๊ณผ ๋ฐฐ๊ฒฝ์ 1-3๋ฌธ์ฅ์ผ๋ก ์ค๋ช
.
## Changes
### ์นดํ
๊ณ ๋ฆฌ 1 (์: ํ์ผ ๊ตฌ์กฐ ๋ณ๊ฒฝ)
- `path/before/` โ `path/after/`
- ๊ตฌ์ฒด์ ์ธ ๋ณ๊ฒฝ ๋ด์ฉ
### ์นดํ
๊ณ ๋ฆฌ 2 (์: ๊ธฐ๋ฅ ์ถ๊ฐ/์์ )
- **ComponentName**: ๋ณ๊ฒฝ ๋ด์ฉ ์ค๋ช
### API/Export ๋ณ๊ฒฝ (ํด๋นํ๋ ๊ฒฝ์ฐ)
```diff
- export {Old} from './old/path';
+ export {New} from './new/path';
```
> **Note**: Breaking changes, ๋ง์ด๊ทธ๋ ์ด์
๊ฐ์ด๋ ๋ฑ
## Test
- [ ] ๊ตฌ์ฒด์ ์ธ ํ
์คํธ ํญ๋ชฉ
Guidelines:
- Group changes by logical category (file structure, features, styles, API, etc.)
- Bold affected components/files
- Use diff blocks for API/export before/after comparisons
- Highlight breaking changes with
> **Note**:
- Test items should be specific, verifiable scenarios
3-2. User confirmation (required)
Show the generated PR content to the user using the current interaction surface and request explicit approval before proceeding:
๐ PR ๋ด์ฉ์ ํ์ธํด์ฃผ์ธ์:
์ ๋ชฉ: {generated title}
๋ณธ๋ฌธ:
{generated body}
์ด๋๋ก PR์ ์์ฑ/์
๋ฐ์ดํธํ ๊น์?
- Approved โ proceed to 3-3
- Revision requested โ incorporate feedback and re-confirm
3-3. Create or update PR
- Check existing PR:
gh pr list --head $(git branch --show-current) --state open
- If exists:
gh pr edit to update title/body
- If not:
gh pr create --base develop
On success:
โ
PR์ด ์์ฑ(์
๋ฐ์ดํธ)๋์์ต๋๋ค!
{PR URL}
Rules
- Target branch: always
develop
- Output messages in Korean
- Ticket extraction: match
/([A-Z]+-\d+)/ from branch name