This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.GitLab.
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 |
---|---|
Nullable |
|
Async |
|
Cake |
|
Cake |
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 |