Pull Requests are a wonderful feature of Github, making managing and accepting patches for your open source project much easier. Recently Github made them even better by adding the option to merge via web interface.
Free Udmey Python Course: Python Mega Course: Go Beginner to Expert in Python 3 (Link is in the description) Came across this when I was doing some web scraping work. The course has 4.2 stars out of 1,516 ratings, so I think it should be decent.
Automate Github Pull Requests Pull Requests are a wonderful feature of Github, making managing and accepting patches for your open source project much easier. Recently Github made them even better by adding the option to merge via web interface. Ghapi is one of the first GitHub OpenAPI libraries for any language, and it fully utilizes Python’s dynamic features to do things that no other REST API library we’ve seen can do. For instance, most OpenAPI libraries use code generation to create separate methods and data types for each part of a spec.
But if you want to try the code before applying, you still need to create a new branch and pull the changes from the requester's branch. It's not complicated but too much to type and copy'n'paste for my taste. Time to automate it.
The new command is called
git pull-request and without an argument it lists all open pull requests for the current repository:
Then you can pick a pull request by giving its number:
As you can see, it creates a new branch and pulls the correct branch from the remote repo for you. No need for any manual work, just give it a number and you're good.
And here's the python script doing all the magic. Just install it somewhere in your path.
Update: The code is now available at github.
- Similar posts:
An asynchronous Python wrapper for the GitHub API, v4.
An asynchronous Python wrapper for GitHub API, v4.
- Easy to use, modern Pythonic API using async/await syntax.
- 100% coverage of the supported GitHub API.
- All public-facing objects and methods are documented.
Python 3.5.2 or higher is required.
To install a final version of the wrapper do one of the following:
To install the development version of the wrapper do one of the following:
Fetch a repository’s license:
You can find more examples in the examples directory.
Release historyRelease notifications RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size github.py-0.5.0-py3-none-any.whl (80.1 kB)||File type Wheel||Python version py3||Upload date||Hashes|
|Filename, size github.py-0.5.0.tar.gz (37.0 kB)||File type Source||Python version None||Upload date||Hashes|
Hashes for github.py-0.5.0-py3-none-any.whl
Python Github GameClose
Chatbot In Python Github
Hashes for github.py-0.5.0.tar.gz
Python Github Tutorial