Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-pull-request

GitHub Action

Just Create A Pull Request

1.2.2

Just Create A Pull Request

git-pull-request

Just Create A Pull Request

Does what it says on the tin, create a pull request, easy and simple

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Just Create A Pull Request

uses: thomaseizinger/[email protected]

Learn more about this action in thomaseizinger/create-pull-request

Choose a version

Create pull request

Does what it says on the tin - creates a pull request, nothing else.

Usage

name: "Create PR"
on: push

jobs:
  create-pr-on-push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]
    
    - name: Create pull request
      uses: thomaseizinger/create-pull-request@master
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        head: ${{ github.ref }}
        base: master
        title: "An automatically created PR!"

Advanced usage

To get an idea of all inputs that are supported, have a look at this file or the tests.

For self-hosted runners behind a corporate proxy, set the https_proxy environment variable.

- name: Create pull request
      uses: thomaseizinger/create-pull-request@master
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        head: ${{ github.ref }}
        base: master
        title: "An automatically created PR!"
      env:
        https_proxy: http://<proxy_address>:<port>

Action outputs

The following outputs can be set by action

  • number - Number of the created pull request.
  • html_url - URL of the created pull request.
  • created - 'true' if pull request was successfully created, 'false' if pull request existed already.