A command line utility to list and merge GitHub pull requests while maintaining linear history
Project description
git-pr-linear-merge
A command line utility to list and merge GitHub pull requests while maintaining linear history.
To maintain linear history, a pull request branch is rebased on top of its base, before merging. This creates a linear history like in this diagram:
Further Reading & Context
- A Tidy Linear Git History
- Avoid Messy Git History
- A Git Workflow for Agile Teams
- Git Rebase Tutorial
Usage
Installing
Python3.6 or above is required. You can install this package by running the following command:
pip3 install git-pr-linear-merge
How To Use
git pr -h
git pr list
git pr merge NUMBER
The first time you run this, you will be asked to authenticate with Github.
Development
This section explains how to setup the dev environment and update the package
Environment setup
python3 -m pip install virtualenv
python3 virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
Running Locally
With the environment setup through the previous step, you can run git pr
using your local code by running the git-pr.py
script in the root directory of this repo.
python3 git-pr.py
Updating the package
Make sure to bump the version number with updates according to PEP 440
Publish and Install from TestPyPi
Before publishing for real, you can test a package by publishing it to TestPyPi
Publishing:
source venv/bin/activate
rm -rf dist
rm -rf build
python -m build
twine upload --repository testpypi dist/*
Installing:
python3 -m pip install --index-url https://test.pypi.org/simple/ git-pr-linear-merge
Publish
source venv/bin/activate
rm -rf dist
rm -rf build
python -m build
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git-pr-linear-merge-1.0.0a4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78f6f6f62c28b14cd3396a56c7313bc141fc43bdb392de56e4975f9cd6e20d1a |
|
MD5 | 6d401ea49a1b47b0ac29ee9052b06070 |
|
BLAKE2b-256 | 322138254417c95b58bab95c015a510709501fd90f0e98ab6f5135645c88b4a4 |
Hashes for git_pr_linear_merge-1.0.0a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c8fe41cc3572c954c5eec98f98071afb34061d0327db986a987e3f382eddef |
|
MD5 | 6e43638acc1625129c5934bf8dff3ab0 |
|
BLAKE2b-256 | aaf450fc8892675ea9dc12c1e041762818fc7163d48055a21ebd0f640c472116 |