Quick PR
A VS Code extension that allows you to create pull requests from selected lines or staged changes with a single click.
Features
- Creates a PR from changes you have selected or currently staged changes
- Automatically handles git operations:
- Pulls latest from base branch
- Creates new branch
- Applies only selected changes
- Commits and pushes
- Creates GitHub PR
- Returns to original branch
- Preserves your other work-in-progress changes
Setup
- Install the extension
- Configure your Github username in settings.json (used for branch naming):
quickPr.githubUsername: "someusername"
Usage
From selection
- Make some changes in your code
- Select the lines you want to include in the PR
- Right-click and select "Make PR from selection" OR use Command Palette
- Enter your commit message (will also be used as PR title)
- The extension will handle the rest!
From staged changes
- Make some changes in your code
- Stage the changes
- Use Command Palette and select "Make PR from staged changes"
- Enter your commit message (will also be used as PR title)
- The extension will handle the rest!
How it Works
- Preserves your current work: Stashes any uncommitted changes
- Pulls latest: Switches to base branch and pulls latest changes
- Creates new branch: Makes a new branch from the updated base
- Applies changes: Only applies your selected/staged lines to the new branch
- Commits and pushes: Commits with your message and pushes to origin
- Creates PR: Opens the new PR screen on Github with the new branch
- Restores state: Returns to your original branch and restores stashed changes
Development
To set up for development:
npm install
npm run compile
To test the extension:
- Open this folder in VS Code
- Press F5 to launch Extension Development Host
- Test your extension in the new window
Known Issues
- Currently only supports GitHub repositories
Release Notes
0.0.1
Initial release with basic PR creation functionality.
| |