| name | rels-pr-review |
| description | Fetches PR review comments for the Rels repo, applies the requested code changes, and posts
reply comments confirming each fix.
Use this skill when asked to "๋ฆฌ๋ทฐ ๋ฐ์ํด์ค", "์ฝ๋ฉํธ ์ฒ๋ฆฌํด์ค", "PR ๋ฆฌ๋ทฐ ๋ต๊ธ ๋ฌ์์ค",
"๋ฆฌ๋ทฐ ์ฝ๋ฉํธ ์ ์ฉํด์ค", or "review ๋ฐ์".
|
Execution Steps
Step 1: Identify the PR
If a PR number is given, use it. Otherwise, detect from the current branch:
gh pr view --json number,title,url
Step 2: Fetch all review comments
gh api repos/:owner/:repo/pulls/{PR_NUMBER}/comments \
--jq '[.[] | {id, path, line, body, user: .user.login}]'
gh pr view {PR_NUMBER} --json reviews \
--jq '.reviews[] | select(.state != "APPROVED") | {id, body, state, author: .author.login}'
Get owner/repo from:
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
Step 3: Process each comment
For every review comment, in order:
- Read the file at the commented path and line
- Understand the requested change
- Apply the fix using Edit (prefer surgical edits over full rewrites)
- Verify the fix makes sense in context
- Record the comment ID for the reply step
Group comments on the same file to minimize reads.
Step 4: Run type check after all fixes
npx tsc --noEmit
Fix any type errors before proceeding.
Step 5: Commit per logical unit, then push
Group review comments by what they change. Commit each group separately โ same rule as rels-git-commit. Record the hash of each commit to use in the reply.
git add {files for this change}
git commit -m "{type}: {ํ๊ตญ์ด ์ค๋ช
}"
git rev-parse --short HEAD
Examples of how to split commits:
- Spinner โ inline JSX:
fix: Spinner๋ฅผ ์ธ๋ผ์ธ JSX๋ก ๊ต์ฒด
- Wrong param name:
fix: ๋์ ๋ผ์ฐํธ ํ๋ผ๋ฏธํฐ๋ช
์์
- gh api placeholder:
fix: gh api ๊ฒฝ๋ก ํ๋ ์ด์คํ๋ ์์
After all commits, push once:
git push
Step 6: Post reply to each comment
Reply to each comment with the hash of the specific commit that fixed it:
gh api repos/VOID-GSM/Rels-front/pulls/{PR_NUMBER}/comments/{COMMENT_ID}/replies \
-X POST \
-f body="๋ฐ์ํ์ต๋๋ค. {HASH_OF_THIS_FIX}"
Reply format โ commit hash only, no description:
๋ฐ์ํ์ต๋๋ค. a3f91bc
If the comment is a question (no code change needed), reply with a brief explanation in Korean.
If disagreeing or needing clarification:
ํ์ธํ์ต๋๋ค. ์๋ํ ๋์์ด ๋ง๋ค๋ฉด ์ ์งํ๊ฒ ์ต๋๋ค. ์๊ฒฌ ์ฃผ์๋ฉด ๋ฐ์ํ๊ฒ ์ต๋๋ค.
Step 7: Summary report
## ๋ฆฌ๋ทฐ ๋ฐ์ ๊ฒฐ๊ณผ
์ปค๋ฐ: {SHORT_HASH}
๋ฐ์ ์๋ฃ {N}๊ฑด:
1. {file}:{line} โ ๋ต๊ธ ๊ฒ์ โ
2. {file}:{line} โ ๋ต๊ธ ๊ฒ์ โ
๊ฑด๋๋ (์ง๋ฌธ/ํ์ธ ํ์): {ํด๋น ํญ๋ชฉ}
Edge Cases
- Comment on a deleted file: note in summary, reply explaining the file was removed
- Conflicting comments: apply both, or ask user to prioritize
- Thread already resolved: verify the fix is actually in place before skipping
- Cannot determine intent: reply asking for clarification, never guess