creating-pull-requests

작성자: streamlit

초안 풀 리퀘스트를 GitHub에 적절한 레이블, 브랜치 명명, 설명 형식으로 생성합니다. 변경 사항을 PR로 제출할 준비가 되었을 때 사용합니다.

npx skills add https://github.com/streamlit/streamlit --skill creating-pull-requests

Create pull request

Create a draft PR on GitHub with appropriate labels after user approval.

Critical constraints:

  • MUST wait for user approval before running gh pr create
  • MUST show complete PR content in chat before creating
  • MUST follow the writing and labeling rules below

Step 1: Choose mode

Always ask the user first:

How would you like to proceed with creating the PR?

  1. Already Ready: I have a feature branch with all changes committed and pushed
  2. Automated: Handle branch creation, committing, and pushing automatically

Wait for user response before proceeding.

Step 2: Execute git workflow

Mode A: Already ready

Validate readiness:

git branch --show-current
git status
git branch -r | grep $(git branch --show-current)

Confirm with user, then proceed to Step 3.

Mode B: Automated

Assumes user has already staged changes with git add.

git status
git checkout develop
git checkout -b {type}/{descriptive-name}
git commit -m "{imperative-verb} {what} {where}"
git push --set-upstream origin $(git branch --show-current)

Branch naming: {type}/{brief-description} in kebab-case. Types: feature, fix, refactor, chore, docs. Examples: feature/add-height-plotly-charts, fix/dataframe-memory-leak-scrolling.

Commit message: <imperative verb> <what> <where>, ≤50 chars, no period. Examples: Add height parameter to plotly charts, Fix memory leak in dataframe scrolling.

Step 3: Compose and create PR

When drafting the title and description below, follow the title/description guidance in the /reviewing-pr-description skill so they are clear and concise from the start.

3.1 Determine labels

All PRs require these labels:

CategoryOptions
Impactimpact:users (affects user behavior) OR impact:internal (no user behavior change)
Change typechange:feature, change:bugfix, change:chore, change:refactor, change:docs, change:spec, change:other

Note: PRs labeled change:spec (for spec/design documents only) are exempt from the impact:* requirement. Do not use change:spec for PRs with code changes.

3.2 Generate PR title

Format: [type] Description of change, ≤63 chars (fits squash-merge commit subjects).

Examples: [feature] Add height parameter to plotly charts, [fix] Extra padding on button.

3.3 Compose PR description

Read .github/pull_request_template.md for the required sections, then fill them in.

Writing rules:

  • Highlight what matters. Omit the obvious.
  • 2-4 bullets maximum for listing changes.
  • No meta-commentary ("This PR...", "We have...", "I added..."). State what changed directly.
  • Don't list: added tests, updated types, added validation, fixed linting (all obvious).
  • DO explain non-obvious decisions (deprecations, unit choices, fallback behavior).

Good:

Adds height parameter to st.plotly_chart() using Height type system.

  • Deprecates use_container_height (removed after 2025-12-31)

Bad (lists every change):

  • Added height parameter to signature
  • Updated layout config dataclass
  • Added validation for height values
  • Added unit tests

Testing section — detect from changed files:

PatternTest type
lib/tests/**/*.pyPython unit tests
frontend/**/*.test.{ts,tsx}Frontend unit tests
e2e_playwright/**/*_test.pyE2E tests

Check the matching boxes in the PR template. If no test files changed, explain why. Leave "manual testing" unchecked (user fills in).

3.4 Write PR for user review

Write complete PR details to work-tmp/pr_description.md:

---
title: [PR title from 3.2]
labels: impact:{users|internal}, change:{type}
---

[PR description from 3.3]

Ask user: "I've written the PR details to work-tmp/pr_description.md. You can edit the title, labels, or description directly in that file. Reply 'yes' when ready to create the PR, or provide feedback for changes."

3.5 Create PR (after user approval only)

Read work-tmp/pr_description.md to get the (potentially edited) title, labels, and description:

# Parse frontmatter from the reviewed file
title=$(grep '^title:' work-tmp/pr_description.md | sed 's/^title: //')
labels=$(grep '^labels:' work-tmp/pr_description.md | sed 's/^labels: //' | sed 's/, /,/g')

# Extract body (everything after the closing --- of frontmatter)
awk '/^---$/{if(++count==2) flag=1; next} flag' work-tmp/pr_description.md > work-tmp/pr_body.md

# Create PR using parsed values
gh pr create \
  --title "$title" \
  --body-file work-tmp/pr_body.md \
  --base develop \
  --label "$labels" \
  --draft

# Clean up temporary files
rm work-tmp/pr_description.md work-tmp/pr_body.md

Reference

For full details on writing principles, labeling, branch naming, and testing plans, see the Pull requests wiki.

streamlit의 다른 스킬

developing-with-streamlit
streamlit
**[필수]** 모든 Streamlit 작업(Streamlit 애플리케이션 생성, 편집, 디버깅, 미화, 스타일링, 테마 적용, 최적화)에 사용하세요. 또한 필요합니다…
official
addressing-pr-review-comments
streamlit
현재 브랜치의 streamlit/streamlit 저장소에 있는 PR의 모든 유효한 리뷰 코멘트를 처리합니다. 인라인 리뷰 코멘트와 일반 PR(이슈) 코멘트를 모두 포함합니다.
official
checking-changes
streamlit
커밋 전에 포맷, 린트, 타입, 단위 테스트 검사를 실행하여 모든 코드 변경 사항을 검증합니다. 백엔드(Python) 또는 프론트엔드(TypeScript) 작업 후에 사용하세요…
official
discovering-make-commands
streamlit
Streamlit 개발에 사용 가능한 make 명령어를 나열합니다. 빌드, 테스트, 린트 또는 포맷 작업에 사용하세요.
official
finalizing-pr
streamlit
병합을 위해 브랜치 변경 사항을 최종 확정하며, 코드 단순화, 검사 실행, 변경 사항 검토, 필요 시 PR 생성을 수행합니다. 변경 사항을 병합할 준비가 되었을 때 사용하세요.
official
fixing-flaky-e2e-tests
streamlit
불안정한 Playwright e2e 테스트를 진단하고 수정합니다. 테스트가 간헐적으로 실패하거나, 시간 초과 오류가 발생하거나, 스냅샷 불일치가 있거나, 브라우저별 특성을 보일 때 사용하세요.
official
fixing-streamlit-ci
streamlit
현재 브랜치/PR에서 실패한 GitHub Actions CI 작업을 분석하고 수정합니다. CI 검사가 실패하거나, PR 검사에서 오류가 표시되거나, 진단이 필요할 때 사용하세요…
official
generating-changelog
streamlit
두 개의 git 태그 사이에 있는 docs.streamlit.io용 정리된 웹사이트 릴리스 노트를 생성합니다. 새로운 Streamlit 릴리스를 준비하거나 변경 사항을 검토할 때 사용합니다.
official