createpr

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 7 Imported by: 0

README ΒΆ

CreatePR

Release Software License Build status GoReportCard

A simple command-line utility that opens GitHub's "New Pull Request" page in your browser directly from your terminal. Skip the manual navigation and instantly create PRs for your current branch.

✨ Features

  • πŸ”„ One Command: Run createpr and immediately open the correct GitHub PR creation page
  • πŸ” Auto-detection: Automatically detects GitHub repository URL from Git remotes
  • 🌿 Branch Aware: Uses your current branch as the source branch for the PR
  • πŸ”’ Secure: Works with both HTTPS and SSH remote URLs
  • πŸš€ Fast: No dependencies other than Git itself

πŸ“¦ Installation

Using Homebrew (macOS)
brew tap internetblacksmith/internetblacksmith
brew install createpr
Using Scoop (Windows)
scoop bucket add internetblacksmith https://github.com/internetblacksmith/scoop-bucket
scoop install internetblacksmith/createpr
Using Pre-built Binaries
  1. Go to the Releases page
  2. Download the appropriate binary for your system:
    • createpr_linux_amd64.tar.gz for Linux (64-bit)
    • createpr_darwin_amd64.tar.gz for macOS (Intel)
    • createpr_darwin_arm64.tar.gz for macOS (Apple Silicon)
    • createpr_windows_amd64.zip for Windows (64-bit)
  3. Extract the archive
  4. Move the createpr executable to a directory in your PATH
Using Go Install

If you have Go installed:

go install github.com/internetblacksmith/createpr@latest

πŸš€ Usage

Navigate to any Git repository in your terminal and run:

createpr

This will:

  1. Detect the GitHub repository URL from your Git remote
  2. Identify your current branch
  3. Open your default web browser to GitHub's "New Pull Request" page with your branch pre-selected
Examples
# Basic usage
cd ~/projects/my-repo
createpr

πŸ§ͺ Development

Prerequisites
  • Go 1.18 or higher
  • Git
Building from Source
# Clone the repository
git clone https://github.com/internetblacksmith/createpr.git
cd createpr

# Build
go build

# Run tests
go test

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by a rant from Theo in one of his streams
  • Built with Go
  • Released with GoReleaser

Made with ❀️ by Internet Blacksmith

```

Planned improvements

  • Add option to open the extended PR view
  • Handle other services BitBucket/Gitlab etc...

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL