GitHubClient.CreatePullRequestAsync Method

Definition

Create a pull request

public virtual System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.PullRequest> CreatePullRequestAsync(string repositoryOwner, string repositoryName, Azure.Connectors.Sdk.GitHub.Models.PullRequestCreateRequest input, System.Threading.CancellationToken cancellationToken = default);
abstract member CreatePullRequestAsync : string * string * Azure.Connectors.Sdk.GitHub.Models.PullRequestCreateRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.PullRequest>
override this.CreatePullRequestAsync : string * string * Azure.Connectors.Sdk.GitHub.Models.PullRequestCreateRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.PullRequest>
Public Overridable Function CreatePullRequestAsync (repositoryOwner As String, repositoryName As String, input As PullRequestCreateRequest, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PullRequest)

Parameters

repositoryOwner
String

Repository Owner

repositoryName
String

Repository Name

input
PullRequestCreateRequest

The request body.

cancellationToken
CancellationToken

Cancellation token.

Returns

The Create a pull request response.

Remarks

This operation is to create a pull request in a repository. 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 create a pull request.

Applies to