Tool for combining GitHub pull requests.
Project description
Tool for combining GitHub pull requests.
- Code:
- Issues:
- License:
MPL v2
- Documentation:
this README
Install
With pipx:
pipx install paul-mclendahand
With pip from PyPI:
pip install paul-mclendahand
With pip from GitHub master branch:
pip install https://github.com/willkg/paul-mclendahand/archive/master.zip
Quick start
Configure git to fetch pull request references
First, you need to have git configured to fetch pull request references. I have an additional fetch line in my remote for github.com. For example, this is what I have for socorro:
[remote "upstream"] url = git@github.com:mozilla-services/socorro.git fetch = +refs/heads/*:refs/remotes/upstream/* fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
The line you need to add is the last one. Make sure to use the right remote:
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/* ^^^^^^^^ use your remote name here
After adding that, when you do git pull, it’ll pull down all the references for pull requests. They’ll be available as upstream/pr/PRNUM.
Configure pmac
pmac needs to know the GitHub user and GitHub project.
You can do that using environment variables:
PMAC_GITHUB_USER=user PMAC_GITHUB_PROJECT=project
or by adding a section to the setup.cfg file:
[tool:paul-mclendahand] github_user=user github_project=project
Using pmac
After you’ve configured git, then you can use pmac like this:
Create a new branch:
git checkout master git checkout -b update-prs
List open PRs:
pmac listprs
Combine some pull requests into it:
pmac add 5100 5101 5102
Use the same pull requests numbers as on GitHub.
If you hit a cherry-pick conflict, pmac will tell you. You can edit the file in another terminal to manually resolve the conflict. Then do:
git add FILE git commit
After that, you can continue with pmac.
When you’re done, push the branch to GitHub and create a pull request.
pmac can help with the PR description:
pmac prmsg
Why does this project exist?
Two main reasons.
First, GitHub doesn’t support combining pull requests. There is a forum post about it here: https://github.community/t5/How-to-use-Git-and-GitHub/Feature-Request-combine-pull-requests/td-p/27660
Second, dependabot (also owned by GitHub) doesn’t support grouping dependency updates into a single pull request. If you have 50 dependency updates, it creates 50 pull requests. I have a lot of projects and lack of grouping updates makes monthly maintenance miserable. There’s an issue for this: https://github.com/dependabot/feedback/issues/5
History
1.0.0 (January 14, 2020)
Initial writing.
Project details
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 paul_mclendahand-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80d65fd079739e5c69b08414329ff4688dd32b1dafea6553180dd2d648242a79 |
|
MD5 | eeec50e85d9afdc454cc7d2f4a6dd875 |
|
BLAKE2b-256 | 0babd1f0117371147a64c91fa6c700e31a502995d8e00998ff5ae90d9b97b5fa |