GitHub Create

GitHub Create

Certified

Create a pull request

Creates a GitHub pull request from a head branch to a base branch. The authenticated token must be allowed to open pull requests in the target repository.

yaml
type: io.kestra.plugin.github.pulls.Create

Create a pull request in a repository.

yaml
id: github_pulls_create_flow
namespace: company.team

tasks:
  - id: create_pull_request
    type: io.kestra.plugin.github.pulls.Create
    oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    repository: kestra-io/kestra
    sourceBranch: develop
    targetBranch: main
    title: Merge develop to main
    body: "Request to merge changes from develop into main"
Properties

GitHub App installation token

Installation access token generated by a GitHub App. Use this for repository-scoped app access instead of a user token.

Pull request body

Markdown description for the pull request. This value is rendered before the request is sent

Defaultfalse

Create as draft

If true, opens the pull request in draft state. Defaults to false.

GitHub API endpoint

GitHub or GitHub Enterprise API base URL such as https://api.github.com or https://ghe.acme.com/api/v3. Set this when targeting GitHub Enterprise or a non-default API endpoint.

GitHub JWT token

GitHub App JWT used for app-level authentication. Use this when the task should authenticate as the app rather than a user.

GitHub login

GitHub login used with oauthToken for authenticated requests. Leave unset when authenticating with jwtToken or appInstallationToken.

Defaultfalse

Allow maintainers to modify

If true, maintainers of the target repo can push to the source branch. Defaults to false.

GitHub OAuth token

GitHub personal access token used for authenticated requests. Can be used alone or with login.

Reference (ref) of the pluginDefaults to apply to this task.

Target repository

Repository in owner/repo format where the pull request will be opened

SubTypestring

Reviewers

GitHub usernames or team slugs to request as pull request reviewers. Prefix team slugs with team: (e.g. team: backend).

Source (head) branch

Required branch with changes. For cross-repo PRs, prefix with username: branch.

Target (base) branch

Required branch to merge into; must exist in the target repository.

Pull request title

Required short summary.

Issue API URL

GitHub API URL for the pull request issue resource

Definitions
authoritystring
filestring
hoststring
portinteger
protocolstring
refstring

Pull request URL

GitHub URL for the created pull request

Definitions
authoritystring
filestring
hoststring
portinteger
protocolstring
refstring