Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: terminology: create pull request vs. open pull request

Is there a difference between creating a pull request and opening a pull request?

Example of some phrases with create a pull request:

  1. Create a pull request to propose and collaborate on changes to a repository.
  2. You can specify which branch you'd like to merge your changes into when you create your pull request.
  3. To create a draft pull request, use the drop-down and select Create Draft Pull Request.

Example of some phrases with open a pull request:

  1. To open a pull request in a public repository, you must have write access to the head or the source branch.
  2. Pull requests can only be opened between two branches that are different.
  3. Once a pull request is opened, you can discuss and review the potential changes with collaborators.

P.S. In my view after creating a pull request it becomes:

  1. Created.
  2. Its state automatically becomes open.

Logically meaning that:

  1. First of all a pull request must be created.

  2. Then a pull request can be opened (its state is open) or closed (its state is closed) as many times as needed.

The consequence is that technically speaking open a pull request does not mean create a pull request.

like image 822
pmor Avatar asked Mar 02 '23 11:03

pmor


2 Answers

Create a pull request and Open a pull request mean the same but just use different verbs to indicate the creation of a PR(pull request). The only confusion that you have is due to open being one of the states of a PR.

When you say

Logically meaning that:

First of all a pull request must be created.

Then a pull request can be opened (its state is open) or closed (its state is closed) as many times as needed.

it doesn't necessarily mean that step 1 is creation and step 2 is opening of a PR, but actually when a PR is created or opened it has open as its state by default. The state is GitHub's internal construct to manage the state of a PR, ie if it's open or closed (closed can mean the PR is either just closed or merged).

  • An open PR can be closed or merged, thereby changing its state from open to closed

  • A PR which is closed (and not merged) can be reopened thereby changing its state from closed to open.

So technically speaking, open a pull request and create a pull request mean the same. Opening a PR which is closed and not yet merged is meant by Reopening a pull request.

like image 86
Madhu Bhat Avatar answered Mar 05 '23 19:03

Madhu Bhat


No, there is no practical difference.

A pull request opened or created means there is a source branch and a destination branch (in the same repo or an upstream repository), which triggers a query for a maintainer to accept/comment or reject said pull request.

Even in GitLab (where the term is "Merge Request", not "Pull Request"), you would see:

Once committed and pushed, you can click on the Create Merge Request button to open the New Merge Request page.

like image 27
VonC Avatar answered Mar 05 '23 18:03

VonC