GitHubClient.GetReferenceAsync Method

Definition

Get a reference

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

Parameters

repositoryOwner
String

Repository Owner

repositoryName
String

Repository Name

reference
String

Reference

cancellationToken
CancellationToken

Cancellation token.

Returns

The Get a reference response.

Remarks

Returns a single reference from your Git database. The reference parameter must be formatted as heads/&lt;branch name&gt; for branches and tags/&lt;tag name&gt; for tags. If the reference doesn't match an existing ref, a 404 is returned.

Applies to