L2 Construct: create_pull_request
pull request githubDescription
CreatePullRequest creates a new pull request in the specified GitHub repository.
L2 Data
- Provider: github
- Module: repo
- Action: create_pull_request
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "github",
"module": "repo",
"action": "create_pull_request",
"metadata": {}
}
}
Input
Example
{
"owner": "octocat",
"repo": "Hello-World",
"title": "Amazing new feature",
"head_branch": "feature-branch",
"base_branch": "main",
"body": "Please pull these awesome changes in!"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/github/repo/create-pull-request-input",
"$ref": "#/$defs/CreatePullRequestInput",
"$defs": {
"CreatePullRequestInput": {
"properties": {
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"title": {
"type": "string"
},
"head_branch": {
"type": "string"
},
"base_branch": {
"type": "string"
},
"body": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"owner",
"repo",
"title",
"head_branch",
"base_branch",
"body"
]
}
}
}
Output
Example
{
"pull_request_number": 1347,
"pull_request_url": "https://github.com/octocat/Hello-World/pull/1347"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/github/repo/create-pull-request-output",
"$ref": "#/$defs/CreatePullRequestOutput",
"$defs": {
"CreatePullRequestOutput": {
"properties": {
"pull_request_number": {
"type": "integer"
},
"pull_request_url": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": ["pull_request_number", "pull_request_url"]
}
}
}