> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Pull Request

Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.

<Note>
  External Documentation

  To learn more, visit the [GitHub documentation](https://docs.github.com/rest/reference/pulls#create-a-pull-request).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter     | Description                                                                                                                                                                                                                     |
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Body          | The contents of the pull request.                                                                                                                                                                                               |
  | Owner         | The organization or person who owns the repository. github.com/{owner}/{repo}                                                                                                                                                   |
  | Repo          | Name of the repository owned by the owner. github.com/{owner}/{repo}                                                                                                                                                            |
  | Source Branch | The name of the branch where your changes are implemented.                                                                                                                                                                      |
  | Target Branch | 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. |
  | Title         | The title of the new pull request.                                                                                                                                                                                              |
</div>

## Example Output

```json theme={"dark"}
{
	"url": "<string>",
	"id": 3239091772,
	"node_id": "<string>",
	"html_url": "<string>",
	"diff_url": "<string>",
	"patch_url": "<string>",
	"issue_url": "<string>",
	"number": 7,
	"state": "<string>",
	"locked": false,
	"title": "<string>",
	"user": {
		"login": "<string>",
		"id": 63613409,
		"node_id": "<string>",
		"avatar_url": "<string>",
		"gravatar_id": "<string>",
		"url": "<string>",
		"html_url": "<string>",
		"followers_url": "<string>",
		"following_url": "<string>",
		"gists_url": "<string>",
		"starred_url": "<string>",
		"subscriptions_url": "<string>",
		"organizations_url": "<string>",
		"repos_url": "<string>",
		"events_url": "<string>",
		"received_events_url": "<string>",
		"type": "<string>",
		"user_view_type": "<string>",
		"site_admin": false
	},
	"body": null,
	"created_at": "2021-10-28T16:05:50Z",
	"updated_at": "2021-10-28T16:05:50Z",
	"closed_at": null,
	"merged_at": null,
	"merge_commit_sha": null,
	"assignee": null,
	"assignees": [],
	"requested_reviewers": [],
	"requested_teams": [],
	"labels": [],
	"milestone": null,
	"draft": false,
	"commits_url": "<string>",
	"review_comments_url": "<string>",
	"review_comment_url": "<string>",
	"comments_url": "<string>",
	"statuses_url": "<string>",
	"head": {
		"label": "<string>",
		"ref": "<string>",
		"sha": "<string>",
		"user": {
			"login": "<string>",
			"id": 46499854,
			"node_id": "<string>",
			"avatar_url": "<string>",
			"gravatar_id": "<string>",
			"url": "<string>",
			"html_url": "<string>",
			"followers_url": "<string>",
			"following_url": "<string>",
			"gists_url": "<string>",
			"starred_url": "<string>",
			"subscriptions_url": "<string>",
			"organizations_url": "<string>",
			"repos_url": "<string>",
			"events_url": "<string>",
			"received_events_url": "<string>",
			"type": "<string>",
			"user_view_type": "<string>",
			"site_admin": false
		},
		"repo": {
			"id": 78120159,
			"node_id": "<string>",
			"name": "<string>",
			"full_name": "<string>",
			"private": false,
			"owner": {
				"login": "<string>",
				"id": 181634932,
				"node_id": "<string>",
				"avatar_url": "<string>",
				"gravatar_id": "<string>",
				"url": "<string>",
				"html_url": "<string>",
				"followers_url": "<string>",
				"following_url": "<string>",
				"gists_url": "<string>",
				"starred_url": "<string>",
				"subscriptions_url": "<string>",
				"organizations_url": "<string>",
				"repos_url": "<string>",
				"events_url": "<string>",
				"received_events_url": "<string>",
				"type": "<string>",
				"user_view_type": "<string>",
				"site_admin": false
			},
			"html_url": "<string>",
			"description": null,
			"fork": false,
			"url": "<string>",
			"forks_url": "<string>",
			"keys_url": "<string>",
			"collaborators_url": "<string>",
			"teams_url": "<string>",
			"hooks_url": "<string>",
			"issue_events_url": "<string>",
			"events_url": "<string>",
			"assignees_url": "<string>",
			"branches_url": "<string>",
			"tags_url": "<string>",
			"blobs_url": "<string>",
			"git_tags_url": "<string>",
			"git_refs_url": "<string>",
			"trees_url": "<string>",
			"statuses_url": "<string>",
			"languages_url": "<string>",
			"stargazers_url": "<string>",
			"contributors_url": "<string>",
			"subscribers_url": "<string>",
			"subscription_url": "<string>",
			"commits_url": "<string>",
			"git_commits_url": "<string>",
			"comments_url": "<string>",
			"issue_comment_url": "<string>",
			"contents_url": "<string>",
			"compare_url": "<string>",
			"merges_url": "<string>",
			"archive_url": "<string>",
			"downloads_url": "<string>",
			"issues_url": "<string>",
			"pulls_url": "<string>",
			"milestones_url": "<string>",
			"notifications_url": "<string>",
			"labels_url": "<string>",
			"releases_url": "<string>",
			"deployments_url": "<string>",
			"created_at": "2021-10-28T16:05:50Z",
			"updated_at": "2021-10-28T16:05:50Z",
			"pushed_at": "2021-10-28T16:05:50Z",
			"git_url": "<string>",
			"ssh_url": "<string>",
			"clone_url": "<string>",
			"svn_url": "<string>",
			"homepage": null,
			"size": 53,
			"stargazers_count": 1,
			"watchers_count": 1,
			"language": "<string>",
			"has_issues": true,
			"has_projects": true,
			"has_downloads": true,
			"has_wiki": true,
			"has_pages": false,
			"has_discussions": false,
			"forks_count": 1,
			"mirror_url": null,
			"archived": false,
			"disabled": false,
			"open_issues_count": 2,
			"license": null,
			"allow_forking": true,
			"is_template": false,
			"web_commit_signoff_required": false,
			"topics": [],
			"visibility": "<string>",
			"forks": 1,
			"open_issues": 2,
			"watchers": 1,
			"default_branch": "<string>"
		}
	},
	"base": {
		"label": "<string>",
		"ref": "<string>",
		"sha": "<string>",
		"user": {
			"login": "<string>",
			"id": 30878208,
			"node_id": "<string>",
			"avatar_url": "<string>",
			"gravatar_id": "<string>",
			"url": "<string>",
			"html_url": "<string>",
			"followers_url": "<string>",
			"following_url": "<string>",
			"gists_url": "<string>",
			"starred_url": "<string>",
			"subscriptions_url": "<string>",
			"organizations_url": "<string>",
			"repos_url": "<string>",
			"events_url": "<string>",
			"received_events_url": "<string>",
			"type": "<string>",
			"user_view_type": "<string>",
			"site_admin": false
		},
		"repo": {
			"id": 1429786250,
			"node_id": "<string>",
			"name": "<string>",
			"full_name": "<string>",
			"private": false,
			"owner": {
				"login": "<string>",
				"id": 64741134,
				"node_id": "<string>",
				"avatar_url": "<string>",
				"gravatar_id": "<string>",
				"url": "<string>",
				"html_url": "<string>",
				"followers_url": "<string>",
				"following_url": "<string>",
				"gists_url": "<string>",
				"starred_url": "<string>",
				"subscriptions_url": "<string>",
				"organizations_url": "<string>",
				"repos_url": "<string>",
				"events_url": "<string>",
				"received_events_url": "<string>",
				"type": "<string>",
				"user_view_type": "<string>",
				"site_admin": false
			},
			"html_url": "<string>",
			"description": null,
			"fork": false,
			"url": "<string>",
			"forks_url": "<string>",
			"keys_url": "<string>",
			"collaborators_url": "<string>",
			"teams_url": "<string>",
			"hooks_url": "<string>",
			"issue_events_url": "<string>",
			"events_url": "<string>",
			"assignees_url": "<string>",
			"branches_url": "<string>",
			"tags_url": "<string>",
			"blobs_url": "<string>",
			"git_tags_url": "<string>",
			"git_refs_url": "<string>",
			"trees_url": "<string>",
			"statuses_url": "<string>",
			"languages_url": "<string>",
			"stargazers_url": "<string>",
			"contributors_url": "<string>",
			"subscribers_url": "<string>",
			"subscription_url": "<string>",
			"commits_url": "<string>",
			"git_commits_url": "<string>",
			"comments_url": "<string>",
			"issue_comment_url": "<string>",
			"contents_url": "<string>",
			"compare_url": "<string>",
			"merges_url": "<string>",
			"archive_url": "<string>",
			"downloads_url": "<string>",
			"issues_url": "<string>",
			"pulls_url": "<string>",
			"milestones_url": "<string>",
			"notifications_url": "<string>",
			"labels_url": "<string>",
			"releases_url": "<string>",
			"deployments_url": "<string>",
			"created_at": "2021-10-28T16:05:50Z",
			"updated_at": "2021-10-28T16:05:50Z",
			"pushed_at": "2021-10-28T16:05:50Z",
			"git_url": "<string>",
			"ssh_url": "<string>",
			"clone_url": "<string>",
			"svn_url": "<string>",
			"homepage": null,
			"size": 1,
			"stargazers_count": 0,
			"watchers_count": 2,
			"language": "<string>",
			"has_issues": true,
			"has_projects": true,
			"has_downloads": true,
			"has_wiki": true,
			"has_pages": false,
			"has_discussions": false,
			"forks_count": 2,
			"mirror_url": null,
			"archived": false,
			"disabled": false,
			"open_issues_count": 2,
			"license": null,
			"allow_forking": true,
			"is_template": false,
			"web_commit_signoff_required": false,
			"topics": [],
			"visibility": "<string>",
			"forks": 2,
			"open_issues": 1,
			"watchers": 0,
			"default_branch": "<string>"
		}
	},
	"_links": {
		"self": {
			"href": "<string>"
		},
		"html": {
			"href": "<string>"
		},
		"issue": {
			"href": "<string>"
		},
		"comments": {
			"href": "<string>"
		},
		"review_comments": {
			"href": "<string>"
		},
		"review_comment": {
			"href": "<string>"
		},
		"commits": {
			"href": "<string>"
		},
		"statuses": {
			"href": "<string>"
		}
	},
	"author_association": "<string>",
	"auto_merge": null,
	"active_lock_reason": null,
	"merged": false,
	"mergeable": null,
	"rebaseable": null,
	"mergeable_state": "<string>",
	"merged_by": null,
	"comments": 1,
	"review_comments": 2,
	"maintainer_can_modify": false,
	"commits": 1,
	"additions": 2,
	"deletions": 2,
	"changed_files": 1
}
```

## Workflow Library Example

[on New Push Event on Github   Scan for Credentials and Handle Findings](https://library.blinkops.com/workflows/on-new-push-event-on-github---scan-for-credentials-and-handle-findings)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/on-new-push-event-on-github---scan-for-credentials-and-handle-findings/canvas" />
</div>
