GitHubClient.CreateReferenceAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a reference
public virtual System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.GitReference> CreateReferenceAsync(string repositoryOwner, string repositoryName, Azure.Connectors.Sdk.GitHub.Models.CreateReferenceRequest input, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateReferenceAsync : string * string * Azure.Connectors.Sdk.GitHub.Models.CreateReferenceRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.GitReference>
override this.CreateReferenceAsync : string * string * Azure.Connectors.Sdk.GitHub.Models.CreateReferenceRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.GitHub.Models.GitReference>
Public Overridable Function CreateReferenceAsync (repositoryOwner As String, repositoryName As String, input As CreateReferenceRequest, Optional cancellationToken As CancellationToken = Nothing) As Task(Of GitReference)
Parameters
- repositoryOwner
- String
Repository Owner
- repositoryName
- String
Repository Name
- input
- CreateReferenceRequest
The request body.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
The Create a reference response.
Remarks
Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.