Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
5ebdef6e
Commit
5ebdef6e
authored
Aug 08, 2018
by
zhangzhenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加list all deploy key接口
parent
dcaa67a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
build.gradle
build.gradle
+1
-1
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+5
-0
GitLabClient.java
src/test/java/org/gitlab/api/GitLabClient.java
+8
-0
test.java
src/test/java/org/gitlab/api/test.java
+3
-1
No files found.
build.gradle
View file @
5ebdef6e
...
...
@@ -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
()
...
...
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
5ebdef6e
...
...
@@ -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
);
}
/**
...
...
src/test/java/org/gitlab/api/GitLabClient.java
View file @
5ebdef6e
...
...
@@ -94,4 +94,12 @@ public class GitLabClient {
return
null
;
}
}
public
static
List
<
DeployKey
>
ListAllDeployKeys
(){
try
{
return
client
.
ListAllDeployKeys
();
}
catch
(
IOException
e
)
{
return
null
;
}
}
}
src/test/java/org/gitlab/api/test.java
View file @
5ebdef6e
...
...
@@ -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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment