Gitlab4J基本使用:使用Java操作gitlab api

Gitlab4J基本使用:使用Java操作gitlab api

第一步:引入pom依赖

<dependency>
    <groupId>org.gitlab4j</groupId>
    <artifactId>gitlab4j-api</artifactId>
    <version>5.3.0</version>
</dependency>

第二步:基本使用,获取账号下有权限访问的所有gitlab仓库

// Create a GitLabApi instance to communicate with your GitLab server
GitLabApi gitLabApi = new GitLabApi("http://xxx", "nSDMVFZDwuhHx3bsGqek");

// Get the list of projects your account has access to
List<Project> projects = gitLabApi.getProjectApi().getProjects();

作者主页:https://github.com/gitlab4j/gitlab4j-api

猜你喜欢

转载自blog.csdn.net/a772304419/article/details/131998710
今日推荐