본문으로 건너뛰기
cccskills
무료GitHub에 공개

github-pr-workflow

GitHub PR lifecycle: branch, commit, open, CI, merge.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

GitHub Pull Request Workflow

Complete guide for managing the PR lifecycle. gh first, git + curl fallback.

Prerequisites

  • Authenticated with GitHub (see github-auth skill)
  • Inside a git repository with a GitHub remote

1. Branch & Commit

# Create feature branch
git checkout -b feature/add-login

# Make changes, commit
git add -A
git commit -m "feat: add login endpoint"

# Push
git push -u origin feature/add-login

2. Create PR

# With gh (interactive)
gh pr create

# With gh (inline)
gh pr create \
  --title "feat: add login endpoint" \
  --body "## Changes
- Add /api/login route
- Add JWT token generation
- Add tests

## Testing
\`\`\`bash
pytest tests/test_auth.py -v
\`\`\`" \
  --base main \
  --head feature/add-login

# With curl
curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls \
  -d '{
    "title":"feat: add login endpoint",
    "body":"Add /api/login route with JWT",
    "head":"feature/add-login",
    "base":"main"
  }'

3. Check CI Status

# With gh
gh pr checks 42

# With curl (check runs)
curl -s "https://api.github.com/repos/$OWNER/$REPO/commits/$HEAD_SHA/check-runs" | python3 -c "
import sys, json
for r in json.load(sys.stdin)['check_runs']:
    print(f'{r[\"name\"]:30s} {r[\"conclusion\"] or r[\"status\"]}')
"

# With curl (statuses — legacy CI)
curl -s "https://api.github.com/repos/$OWNER/$REPO/commits/$HEAD_SHA/status" | python3 -c "
import sys, json
r = json.load(sys.stdin)
print(f'Overall: {r[\"state\"]}')
for s in r['statuses']:
    print(f'  {s[\"context\"]:30s} {s[\"state\"]}')
"

4. Update PR (push more commits)

# Make more changes
git add -A
git commit --fixup HEAD  # or regular commit
git push
# PR automatically updates

5. Review & Approve

# Request review
gh pr edit 42 --add-reviewer username

# Approve (as reviewer)
gh pr review 42 --approve --body "LGTM!"

# Request changes
gh pr review 42 --request-changes --body "See inline comments."

# Comment
gh pr review 42 --comment --body "Some suggestions."

6. Merge

# With gh
gh pr merge 42 --merge        # merge commit
gh pr merge 42 --squash       # squash merge
gh pr merge 42 --rebase       # rebase merge
gh pr merge 42 --squash --delete-branch  # squash + delete branch

# With curl
curl -s -X PUT \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls/42/merge \
  -d '{"merge_method":"squash"}'

7. Cleanup

# Delete local branch
git checkout main
git pull origin main
git branch -d feature/add-login

# Delete remote branch (if not auto-deleted)
git push origin --delete feature/add-login

Full Workflow Example

# 1. Branch
git checkout -b fix/issue-42-login-timeout

# 2. Implement + test
# ... make changes ...
pytest tests/test_auth.py -v

# 3. Commit
git add -A
git commit -m "fix: increase login timeout to 30s (fixes #42)"

# 4. Push
git push -u origin fix/issue-42-login-timeout

# 5. Create PR
gh pr create --title "fix: increase login timeout (fixes #42)" --body "..." --base main

# 6. Check CI
gh pr checks

# 7. After CI passes + review approved
gh pr merge --squash --delete-branch

# 8. Cleanup
git checkout main && git pull

Pitfalls

  • fixes #42: auto-closes issue 42 on merge. Use refs #42 to reference without closing.
  • Squash merge: all commits become one. Branch history is lost. Best for small PRs.
  • Merge conflicts: git fetch origin && git rebase origin/main to resolve before pushing.
  • Draft PR: gh pr create --draft marks as WIP. Reviewers can't approve until marked ready.
  • Force push: git push --force-with-lease (not --force) to avoid overwriting others' work on shared branches.
  • CI not triggering: check if branch protection rules require specific status checks. Some CI only runs on certain branch patterns.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Structured peer-review of academic papers.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

Dark-themed SVG architecture/cloud/infra diagrams as HTML.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

arxiv

무료

Search arXiv papers by keyword, author, category, or ID.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

Monitor blogs and RSS/Atom feeds via blogwatcher-cli.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

bootstrap

무료

Onboarding conversation to generate a user profile.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

Generate charts: select type, extract data, render image.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

HezaoHezao/poirot2512026년 7월 29일 업데이트

HezaoHezao의 스킬 모두 보기

이 스킬의 문제 신고