Github - Create Pull Request
@sergio
code:
data:privatelast updated:4 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
github_create_pull_request
Creates a pull requests in a repository.
auth
(auths.github)
params
Base

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.

 
string ·params.base
Head

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.

 
string ·params.head
Title

The title of the new pull request.

 
string ·params.title
Owner

Name of repository owner.

 
string ·params.owner
Repo

Name of repository.

 
string ·params.repo
Optional
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
}
20
//See the API docs here: https://developer.github.com/v3/pulls/#create-a-pull-request
const data = {
  base: params.base,
  body: params.body,
  head: params.head,
  title: params.title,
  maintainer_can_modify: params.maintainer_can_modify,
  draft: params.draft
}
return await require("axios")({
  method: "post",
  url: `https://api.github.com/repos/${params.owner}/${params.repo}/pulls`,
  headers: {
    Authorization: `Bearer ${auths.github.oauth_access_token}`,
    "Content-Type": "application/json"
  },
  data
});