GitLabAliases.

GitLabRepositoryGetBranchesAsync(ICakeContext, string, string, ProjectId) Method

Summary

Lists all of a project's branches
Assembly
Cake.GitLab.dll
Namespace
Cake.GitLab
Containing Type
GitLabAliases

Syntax

public static Task<IReadOnlyCollection<Branch>> GitLabRepositoryGetBranchesAsync(this ICakeContext context, string serverUrl, string accessToken, ProjectId project)

Examples

[TaskName("Get-Branches")] public class GetBranchesTask : AsyncFrostingTask { public override Task RunAsync(ICakeContext context) { await context.GitLabRepositoryGetBranchesAsync( "https://gitlab.com", "ACCESSTOKEN" "owner/repository" ); } }

Attributes

Type Description
NullableContextAttribute
AsyncStateMachineAttribute
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The current Cake context.
serverUrl string The url of the GitLab server
accessToken string The access token for authenticating to the GitLab server
project ProjectId The path (name and namespace) or id of the project to get the branches for.

Return Value

Type Description
Task<IReadOnlyCollection<Branch>>