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 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.

External Documentation

To learn more, visit the GitHub documentation.

Parameters

ParameterDescription
BodyThe contents of the pull request.
OwnerThe organization or person who owns the repository. github.com//
Pull NumberThe number that identifies the pull request.
RepoName of the repository owned by the owner. github.com//
StateState of this Pull Request. Either open or closed.
Target BranchThe name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
TitleThe title of the pull request.

Example Output

{
	"url": "<string>",
	"id": 208452109,
	"node_id": "<string>",
	"html_url": "<string>",
	"diff_url": "<string>",
	"patch_url": "<string>",
	"issue_url": "<string>",
	"number": 24,
	"state": "<string>",
	"locked": false,
	"title": "<string>",
	"user": {
		"login": "<string>",
		"id": 377357034,
		"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": "2021-10-28T16:05:50Z",
	"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": 110511356,
			"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": 1486160058,
			"node_id": "<string>",
			"name": "<string>",
			"full_name": "<string>",
			"private": false,
			"owner": {
				"login": "<string>",
				"id": 37530420,
				"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": 17,
			"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": 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": 0,
			"watchers": 1,
			"default_branch": "<string>"
		}
	},
	"base": {
		"label": "<string>",
		"ref": "<string>",
		"sha": "<string>",
		"user": {
			"login": "<string>",
			"id": 96926595,
			"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": 1158563753,
			"node_id": "<string>",
			"name": "<string>",
			"full_name": "<string>",
			"private": false,
			"owner": {
				"login": "<string>",
				"id": 176564025,
				"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": 23,
			"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": 1,
			"watchers": 2,
			"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": 2,
	"review_comments": 2,
	"maintainer_can_modify": false,
	"commits": 1,
	"additions": 1,
	"deletions": 0,
	"changed_files": 2
}

Workflow Library Example

Update Pull Request with Github and Send Results Via Email

Preview this Workflow on desktop