在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:nmklotas/GitLabApiClient开源软件地址:https://github.com/nmklotas/GitLabApiClient开源编程语言:C# 99.4%开源软件介绍:GitLabApiClientGitLabApiClient is a .NET rest client for GitLab API v4. Main features
Quick startAuthenticate// if you have auth token:
var client = new GitLabClient("https://gitlab.example.com", "your_private_token"); // if you want to use username & password:
var client = new GitLabClient("https://gitlab.example.com");
await client.LoginAsync("username", "password"); Use it// create a new issue.
await client.Issues.CreateAsync("group/project", new CreateIssueRequest("issue title"));
// list issues for a project with specified assignee and labels.
await client.Issues.GetAsync("group/project", o => o.AssigneeId = 100 && o.Labels == new[] { "test-label" });
// create a new merge request featureBranch -> master.
await client.MergeRequests.CreateAsync("group/project", new CreateMergeRequest("featureBranch", "master", "Merge request title")
{
Labels = new[] { "bugfix" },
Description = "Implement feature"
});
// get a list of projects and find each project's README.
var projects = await Client.Projects.GetAsync();
foreach (var project in projects)
{
var file = await Client.Files.GetAsync(project, filePath: "README.md", reference: project.DefaultBranch);
var readme = file.ContentDecoded;
// mad science goes here
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论