GitHubClient.GetReferenceAsync 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.
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/<branch name> for branches and tags/<tag name> for tags. If the reference doesn't match an existing ref, a 404 is returned.