类 Gitlab
java.lang.Object
com.xiaomi.youpin.gitlab.Gitlab
- 作者:
- gaoyibo
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明acceptMerge(String projectId, String iid, String token) acceptMerge(String gitHost, String projectId, String iid, String token) static booleanaccessLevelMoreThan(AccessLevel accessLevel, String userToken, String groupName) 已过时。static booleanaccessLevelMoreThan(String gitHost, AccessLevel accessLevel, String userToken, String groupName) 10 => Guest access 20 => Reporter access 30 => Developer access 40 => Maintainer access 50 => Owner access # Only valid for groupsaddHook(GitWebhook gitWebhook, String token) closeMerge(String gitHost, String projectId, String iid, String token) createBranch(String projectId, String branchName, String ref, String token) static booleancreateEmptyProject(String gitUrl, String username, String token) createMerge(String gitHost, String projectId, String sourceBranch, String targetBranch, String title, String token) static booleancreateNewProject(String gitUrl, String path, String username, String token) deleteBranch(String projectId, String branchName, String token) deleteHook(GitWebhook gitWebhook, String token) editHook(GitWebhook gitWebhook, String token) 已过时。fetchCommit(String projectId, String sha, String token) 已过时。fetchCommit(String gitHost, String projectId, String sha, String token) fetchCommits(String gitHost, String projectId, String branch, String token, Map<String, String> params) 已过时。已过时。fetchFileVersion(String projectId, String token, String path, String branch) 已过时。已过时。fetchProjects(String token, Map<String, String> params) 已过时。getBranchInfo(String gitHost, String projectId, String branch, String token) getCommitInfoByBranch(String gitHost, String projectId, String branch, String token) 在gitlab搜索关键字,根据返回内容进行upstream语法树解析static List<GitlabMember> getGitlabMembers(String gitHost, String groupId, String userToken, String username) 已过时。getMergeChange(String gitHost, String projectId, String iid, String token) getNamespacesById(String id, String token) 已过时。getNamespacesById(String gitHost, String id, String token) getProjectByAddress(String gitHost, String groupName, String projectName, String token) getProjectTag(Long projectId, String token) getProjectTagByCommitId(Long projectId, String commitId, String token) static voidstatic booleanpush(String gitUrl, String branch, String changedBody, String filePathToReplace, String commitMessage) static booleanpush(String gitUrl, String branch, String username, String token, String changedBody, String filePathToReplace, String commitMessage) static voidunZipFiles(File zipFile, String descDir)
-
构造器详细资料
-
Gitlab
-
Gitlab
public Gitlab()
-
-
方法详细资料
-
fetchFile
已过时。 -
fetchFileVersion
@Deprecated public List<GitlabCommit> fetchFileVersion(String projectId, String token, String path, String branch) 已过时。 -
fetchProjects
已过时。 -
fetchProject
@Deprecated public GitlabProject fetchProject(String projectId, String token, Map<String, String> params) 已过时。 -
fetchBranches
@Deprecated public List<GitlabBranch> fetchBranches(String projectId, String token, Map<String, String> params) 已过时。 -
getGroups
@Deprecated public List<GitlabGroup> getGroups(String token, Map<String, String> params) throws UnsupportedEncodingException已过时。 -
fetchCommits
@Deprecated public List<GitlabCommit> fetchCommits(String projectId, String branch, String token, Map<String, String> params) 已过时。 -
fetchCommit
已过时。 -
getNamespacesById
已过时。 -
fetchFile
-
fetchFileVersion
-
fetchProjects
-
fetchProject
-
fetchBranches
public List<GitlabBranch> fetchBranches(String gitHost, String projectId, String token, Map<String, String> params) throws InvalidTokenException, NotFoundException -
getGroups
public List<GitlabGroup> getGroups(String gitHost, String token, Map<String, String> params) throws UnsupportedEncodingException -
fetchCommits
public List<GitlabCommit> fetchCommits(String gitHost, String projectId, String branch, String token, Map<String, String> params) throws InvalidTokenException, NotFoundException -
fetchCommit
-
getNamespacesById
-
push
-
push
-
main
public static void main(String[] args) throws IOException, org.eclipse.jgit.api.errors.GitAPIException - 抛出:
IOExceptionorg.eclipse.jgit.api.errors.GitAPIException
-
createNewProject
public static boolean createNewProject(String gitUrl, String path, String username, String token) throws IOException, org.eclipse.jgit.api.errors.GitAPIException - 抛出:
IOExceptionorg.eclipse.jgit.api.errors.GitAPIException
-
createEmptyProject
public static boolean createEmptyProject(String gitUrl, String username, String token) throws IOException, org.eclipse.jgit.api.errors.GitAPIException - 抛出:
IOExceptionorg.eclipse.jgit.api.errors.GitAPIException
-
unZipFiles
- 抛出:
IOException
-
accessLevelMoreThan
@Deprecated public static boolean accessLevelMoreThan(AccessLevel accessLevel, String userToken, String groupName) 已过时。 -
accessLevelMoreThan
public static boolean accessLevelMoreThan(String gitHost, AccessLevel accessLevel, String userToken, String groupName) 10 => Guest access 20 => Reporter access 30 => Developer access 40 => Maintainer access 50 => Owner access # Only valid for groups- 参数:
accessLevel-- 返回:
-
getGitlabMembers
-
getProjectTag
-
getProjectTagByCommitId
-
createBranch
-
createBranch
-
deleteBranch
-
createMerge
-
createMerge
-
acceptMerge
-
acceptMerge
-
closeMerge
-
getMerge
-
getMergeChange
-
addHook
-
editHook
-
deleteHook
-
getProjectByAddress
-
getCommitInfoByBranch
-
getBranchInfo
-
getRepositoryCompare
-
getDomainByIP
public List<String> getDomainByIP(String gitHost, String project, String branch, List<String> keywords, String token) 在gitlab搜索关键字,根据返回内容进行upstream语法树解析- 参数:
gitHost-project-branch-keywords-token-- 返回:
-
getDomainByIP
-