com um clique
finalizing-pr
// Finalizes branch changes for merging by simplifying code, running checks, reviewing changes, and creating a PR if needed. Use when ready to merge changes into the target branch.
// Finalizes branch changes for merging by simplifying code, running checks, reviewing changes, and creating a PR if needed. Use when ready to merge changes into the target branch.
Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the streamlit/streamlit repository.
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Use when a PR has received reviewer feedback that needs to be addressed, including code changes, style fixes, and documentation updates.
Debug Streamlit frontend and backend changes using make debug with hot-reload. Use when testing code changes, investigating bugs, checking UI behavior, or needing screenshots of the running app.
Lists available make commands for Streamlit development. Use for build, test, lint, or format tasks.
Implementation guide for new Streamlit features. Use when adding new elements, widgets, or features that span backend, frontend, and protobufs.
Validates all code changes before committing by running format, lint, type, and unit test checks. Use after making backend (Python) or frontend (TypeScript) changes, before committing or finishing a work session.
| name | finalizing-pr |
| description | Finalizes branch changes for merging by simplifying code, running checks, reviewing changes, and creating a PR if needed. Use when ready to merge changes into the target branch. |
Prepares the current branch for merge by running quality checks, simplifying code, and creating a PR if one doesn't exist.
Follow these steps in order:
Note: For small changes (documentation tweaks, test-only tweaks, one-liners, or other mini-changes), you can skip steps 1, 2, 5, 6, and 7.
Run make all in a subagent to ensure the build and installation are up-to-date. Wait for completion before proceeding.
make all
Run the simplifying-local-changes subagent to clean up and simplify the code changes. Wait for completion before proceeding.
Run autofix in a subagent to fix formatting and linting issues. Wait for completion before proceeding.
make autofix
Run the /checking-changes skill in a subagent (uses make check) to validate the changes. Wait for completion, then fix any issues found before proceeding. Don't run other checks besides make check in this step.
Run the reviewing-local-changes subagent to review the changes. Wait for completion and read the review output.
Review the recommendations from step 5. For each recommendation:
Run the /checking-changes skill in a subagent (uses make check) to validate the changes. Wait for completion, then fix any issues found before proceeding. Don't run other checks besides make check in this step.
Note: If currently on
develop, create a new branch first following the naming conventions inwiki/pull-requests.md.
Check if a PR exists for the current branch:
gh pr view --json number,title,url
If no PR exists, create one following the guidelines in wiki/pull-requests.md. Add appropriate labels (impact:* and change:*) and fill in the body based on .github/pull_request_template.md (skip the video/screenshot section):
gh pr create --push --base develop --title "[type] Description" --body "$(cat <<'EOF'
## Describe your changes
- Change 1
- Change 2
## Testing Plan
- [x] Unit Tests (JS and/or Python)
EOF
)" --label "impact:users,change:feature"
If PR exists, check if description needs updating based on current changes.
Run the fixing-pr subagent to automatically wait for CI, fix any failures, address PR review comments, validate changes, and push. Wait for completion before proceeding.
Apply the ai-review label to trigger the final AI code review:
gh pr edit --add-label "ai-review"