Splice Bot
Extract selected lines from a pull request and create a new focused PR.
Quick Start
1. Add the workflow
Copy .github/workflows/splice-bot.yml to your repository, changing uses: ./ to uses: jcommelin/splice-pr@master.
2. Enable repository permissions
Go to Settings > Actions > General > Workflow permissions:
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
3. Use it
- Review a pull request
- Select lines in the diff view
- Add a review comment containing
splice-bot - The bot creates a new PR with just those changes
Command Options
splice-bot # Basic usage
splice-bot "Fix typo in docs" # Custom PR title
splice-bot title:"Fix bug" base:main # Structured options
splice-bot labels:bug,urgent --draft # Labels and draft PR
splice-bot reviewers:alice,bob # Request reviewers
splice-bot --entire-hunk # Extract full hunk
splice-bot --entire-file # Extract all file changes
| Option | Description |
|---|---|
title |
Custom PR title |
base |
Base branch (defaults to original PR's base) |
description |
Custom PR description |
labels |
Comma-separated labels to add |
reviewers |
Comma-separated usernames (@ optional) |
branch |
Custom branch name |
--draft |
Create as draft PR |
--entire-hunk |
Extract the complete hunk containing the comment |
--entire-file |
Extract all changes from the file |
How It Works
- Extracts the selected lines from the PR diff
- Creates a new branch from the base branch
- Applies only the selected changes
- Creates a PR and replies with a link
The commit author is set to whoever left the review comment.
Limitations
- Single file selections only (multi-file support planned)
- Requires the repository permission settings above
License
MIT
On this page
Contributors
Created November 18, 2025
Updated November 22, 2025