All Projects → Mergifyio → Git Pull Request

Mergifyio / Git Pull Request

Licence: apache-2.0
Send git pull requests via command line

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Git Pull Request

Kodiak
🔮 A bot to automatically update and merge GitHub PRs
Stars: ✭ 644 (+460%)
Mutual labels:  pull-requests
Atom Pull Requests
View/Edit comments on a Pull Request directly inside the Atom Editor
Stars: ✭ 47 (-59.13%)
Mutual labels:  pull-requests
Revert
A GitHub Action to automatically revert a commit on a '/revert' comment
Stars: ✭ 89 (-22.61%)
Mutual labels:  pull-requests
Contribute A Thon
Month-long Open Source contributing event ✨
Stars: ✭ 26 (-77.39%)
Mutual labels:  pull-requests
Reviewbot
Reviewbot is a Slack bot that shows reviewable pull requests.
Stars: ✭ 40 (-65.22%)
Mutual labels:  pull-requests
Repo Lockdown
GitHub Action that immediately closes and locks issues and pull requests
Stars: ✭ 56 (-51.3%)
Mutual labels:  pull-requests
Hacktoberfest 2020
Make this Hacktoberfest a learning period and contribute to Great Open Source Projects.
Stars: ✭ 492 (+327.83%)
Mutual labels:  pull-requests
Jni By Examples
🎇Fun Java JNI By Examples - with CMake and C++ (or C, of course!) ‼️ Accepting PRs
Stars: ✭ 99 (-13.91%)
Mutual labels:  pull-requests
Github Review Filter
Chrome extension to filter files in GitHub code review using glob
Stars: ✭ 42 (-63.48%)
Mutual labels:  pull-requests
Export Pull Requests
Export pull requests and/or issues to a CSV file. Supports GitHub, GitLab, and Bitbucket
Stars: ✭ 68 (-40.87%)
Mutual labels:  pull-requests
Probot Gpg
A GitHub App that enforces GPG signatures on pull requests (no longer maintained)
Stars: ✭ 13 (-88.7%)
Mutual labels:  pull-requests
Squashed Merge Message
Use Pull Request description as Squashed and Merged commit messages.
Stars: ✭ 34 (-70.43%)
Mutual labels:  pull-requests
Hacktoberfest2020
Make your first Pull Request and earn a free tee from GitHub!
Stars: ✭ 1,141 (+892.17%)
Mutual labels:  pull-requests
Derek
Reduce maintainer fatigue by automating GitHub
Stars: ✭ 714 (+520.87%)
Mutual labels:  pull-requests
24pullrequests
🎄 Giving back to open source for the holidays
Stars: ✭ 1,290 (+1021.74%)
Mutual labels:  pull-requests
Refined Bitbucket
Chrome and Firefox extension that improves Bitbucket's user experience
Stars: ✭ 560 (+386.96%)
Mutual labels:  pull-requests
Monocle
Detect anomalies in your GitHub/Gerrit projects
Stars: ✭ 50 (-56.52%)
Mutual labels:  pull-requests
Acyl
Testing Environments On Demand
Stars: ✭ 105 (-8.7%)
Mutual labels:  pull-requests
Awesome Pull Requests
How people work together (PR welcome!)
Stars: ✭ 94 (-18.26%)
Mutual labels:  pull-requests
Changelog Ci
Changelog CI is a GitHub Action that generates changelog, Then the changelog is committed and/or commented to the release Pull request.
Stars: ✭ 68 (-40.87%)
Mutual labels:  pull-requests

================== git-pull-request

.. image:: https://circleci.com/gh/Mergifyio/git-pull-request.svg?style=svg&circle-token=a9e42c2dbc567363643837c7d68e4675b8a874a9 :target: https://circleci.com/gh/Mergifyio/git-pull-request :alt: Build Status

.. image:: https://badge.fury.io/py/git-pull-request.svg :target: https://badge.fury.io/py/git-pull-request

git-pull-request is a command line tool to send GitHub or Pagure_ pull-request from your terminal.

Installation

Use the standard Python installation method::

pip3 install git-pull-request

Although it might not be up to date with the latest code on GitHub <https://github.com/jd/git-pull-request>_ Fedora <https://getfedora.org>_ 28+ users can also download straight via package manager DNF <https://fedoraproject.org/wiki/DNF>_::

sudo dnf install git-pull-request

Usage

Once you've made your commits into a branch, just type::

git pull-request

This will:

  1. Fork the upstream repository into your account (if needed)
  2. Add your forked repository as a remote named "github" (if needed)
  3. Force push your current branch to your remote
  4. Create a pull-request for your current branch to the remote matching branch, or master by default.

If you add more commits to your branch later, or need to rebase your branch to edit commits, you'll just need to run git pull-request to update your pull-request. git-pull-request automatically detects that a pull-request has been opened for your current working branch.

Workflow advice

Caching Credentials

GitHub has a good documentation about using git credential <https://help.github.com/en/articles/caching-your-github-password-in-git>_.

The full documentation is available on the git-scm.com website <https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage>_.

GitHub

If you set up 2-Factors Authentication for your GitHub account, you should create a personal token <https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line>_ and request the repo permission, then use that as your password.

Pagure Token

Pagure uses API key, you need to create one by visiting your settings <https://pagure.io/settings#nav-api-tab>_ and requesting the Fork a project and Modify an existing project ACL.

Creating Branches

When sending pull-requests, it's preferable to do so from your own branch. You can create your own branch from master by doing::

$ git checkout -b myownbranch --track origin/master

This will checkout a new branch called myownbranch that is a copy of master. Using the --track option makes sure that the upstream source branch is written in your .git/config file. This will allow git-pull-request to know to which branch send the pull-request.

Since this is long to type, you can use an alias in git to make it faster::

$ git config --global alias.nb '!git checkout --track $(git config branch.$(git rev-parse --abbrev-ref HEAD).remote)/$(git rev-parse --abbrev-ref HEAD) -b'

This will create a git nb alias that will create a new branch tracking the current branch and checking it out. You can then use it like that::

$ git nb foobar Branch foobar set up to track remote branch master from origin. Switched to a new branch 'foobar'

Configuration via git config

Most git-pull-request command line arguments can be store into your git configuration.

For a particular repository, if you get tired of using::

$ git pull-request --fork never

You can set the option with git and use the command without any arguments::

$ git config git-pull-request.fork never $ git pull-request

You can also set the option globally to have a custom default for all your repositories with::

$ git config --global git-pull-request.fork always $ git pull-request

Difference with hub

The wrapper hub_ provides hub fork and hub pull-request as command line tools to fork and create pull-requests.

Unfortunately, it's hard to combine these tools in an automated implementation for a complete workflow.

For example: If you need to update your pull-request, there's no way to identify existing pull requests, so calling hub pull-request would just open a new pull-request.

git-pull-request wraps all of these operations into one convenient tool.

.. _hub: https://hub.github.com/ .. _Pagure: https://pagure.io/pagure

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].