Commit 5ebdef6e authored by zhangzhenglong's avatar zhangzhenglong

添加list all deploy key接口

parent dcaa67a6
......@@ -15,7 +15,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'cn.com.duiba.tool'
version = '1.3.1-SNAPSHOT'
version = '1.3.7-SNAPSHOT'
repositories {
mavenLocal()
......
......@@ -309,6 +309,11 @@ public class GitlabAPI {
return retrieve().method("POST").to(tailUrl, DeployKey.class);
}
public List<DeployKey> ListAllDeployKeys() throws IOException {
String tailUrl = "deploy_keys";
return retrieve().getAll(tailUrl,DeployKey[].class);
}
/**
......
......@@ -94,4 +94,12 @@ public class GitLabClient {
return null;
}
}
public static List<DeployKey> ListAllDeployKeys(){
try {
return client.ListAllDeployKeys();
} catch (IOException e) {
return null;
}
}
}
......@@ -55,7 +55,9 @@ public class test {
// System.out.println("所有的MR总数" +all);
GitlabAPI gitlabAPI = GitLabClient.getClient();
DeployKey deployKey=gitlabAPI.enableDeployKey(630,469);
//DeployKey deployKey=gitlabAPI.enableDeployKey(630,469);
List<DeployKey> deployKeys=GitLabClient.ListAllDeployKeys();
System.out.println(DeployKey.URL);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment