apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/pulls — GitHub API

GitHub playground

Create a pull request

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

8 body fields
  • title · optional · string — The title of the new pull request. Required unless `issue` is specified.
  • head · required · string — 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`.
  • head_repo · optional · string — The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization.
  • base · required · string — 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.
  • body · optional · string — The contents of the pull request.
  • maintainer_can_modify · optional · boolean — Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.
  • draft · optional · boolean — Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more.
  • issue · optional · integer — An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified.