finishing-branches

BPSAI's avatarfrom BPSAI

Use when work is complete and ready for integration, merge, or PR creation.

⭐2stars🔀0forks📁View on GitHub🕐Updated Dec 31, 2025

When & Why to Use This Skill

The finishing-branches skill automates the critical transition from local development to code integration. It streamlines the final steps of the software development lifecycle by enforcing pre-merge checklists, conducting security scans, and automating Pull Request (PR) creation. This ensures that every branch meets quality and security standards before being merged, enhancing overall repository health and team productivity.

Use Cases

  • Automated Pre-merge Validation: Running comprehensive test suites and linting checks (e.g., pytest, ruff) to ensure code stability before integration.
  • Security and Secret Scanning: Automatically checking staged changes for leaked credentials or sensitive information using security scan tools before pushing to remote repositories.
  • Standardized Pull Request Creation: Generating GitHub PRs with automated templates that include summaries, change logs, and testing checklists to maintain high documentation standards.
  • Workflow Cleanup: Automating post-merge tasks such as deleting local feature branches and synchronizing the main branch to maintain a clean development environment.
namefinishing-branches
descriptionUse when work is complete and ready for integration, merge, or PR creation.

Finish Branch

Pre-Merge Checklist

1. Run All Checks

bpsai-pair ci                 # Tests + linting in one command
bpsai-pair validate           # Check project structure

2. Security Scan

bpsai-pair security scan-secrets --staged   # Check for leaked secrets

3. Review Changes

git diff main...HEAD --stat
git diff main...HEAD | grep -E "print\(|breakpoint|TODO|FIXME"

4. Update Task Status

Follow managing-task-lifecycle skill for two-step completion.

5. Create PR

bpsai-pair github auto-pr     # Auto-creates PR from branch, detects TASK-xxx

PR Template

## Summary
Brief description.

## Changes
- Added X
- Modified Y
- Fixed Z

## Testing
- [ ] Unit tests added/updated
- [ ] All tests passing
- [ ] Manual testing completed

## Checklist
- [ ] No debug statements
- [ ] Documentation updated
- [ ] Task status updated

Post-Merge

git checkout main
git pull origin main
git branch -d <feature-branch>

Quick Finish

pytest && ruff check . && git add -A && git commit -m "[TASK-XXX] Description" && git push