GitHub Pull Requests Create

GitHub Pull Requests 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.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

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.

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