Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 
 
 
 
 

Repository files navigation

create-pull-request-action

Release Self Test Update From Template

This action simply calls the GitHub API to create a pull request with the provided parameters. It also returns the response from the API as a stringified JSON output.

If the authentication token passed is the generated GITHUB_TOKEN, it should have the pull-requests: write permissions. It should be noted also, that the GITHUB_TOKEN used when creating pull requests won't trigger the majority of workflows.

Inputs

Name Required Description
head true The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
base true The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
title false The pull request title.
body false The pull request body.
github-token false The GitHub token to authenticate with the API. Defaults to ${{ github.token }}
repository false The repository where the pull request will be opened. Defaults to ${{ github.repository }}.

Outputs

Name Description
pull-request The created pull request payload, as returned by the api.

Permissions

If you're using the GITHUB_TOKEN, then it should have the following permissions:

Scope Level Reason
pull-requests write To create a pull request esé.

Usage

- uses: infra-blocks/create-pull-request-action@v1
  with:
    head: feature/your-branch
    base: main

About

A GitHub Action that simply opens a pull request on the behalf of the authenticated user.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors