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
ee7bc843
Commit
ee7bc843
authored
Jan 30, 2017
by
Pokerkoffer
Committed by
Tim Olshansky
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recursive file tree from repo (#184)
* Recursive option on repository tree * added path attribute to Repoclass
parent
36e858e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+3
-2
GitlabRepositoryTree.java
...main/java/org/gitlab/api/models/GitlabRepositoryTree.java
+8
-0
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
ee7bc843
...
...
@@ -1243,10 +1243,11 @@ public class GitlabAPI {
* @param ref_name The name of a repository branch or tag or if not given the default branch (optional)
* @throws IOException on gitlab api call error
*/
public
List
<
GitlabRepositoryTree
>
getRepositoryTree
(
GitlabProject
project
,
String
path
,
String
ref_name
)
throws
IOException
{
public
List
<
GitlabRepositoryTree
>
getRepositoryTree
(
GitlabProject
project
,
String
path
,
String
ref_name
,
boolean
recursive
)
throws
IOException
{
Query
query
=
new
Query
()
.
appendIf
(
"path"
,
path
)
.
appendIf
(
"ref_name"
,
ref_name
);
.
appendIf
(
"ref_name"
,
ref_name
)
.
appendIf
(
"recursive"
,
recursive
);
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
project
.
getId
()
+
"/repository"
+
GitlabRepositoryTree
.
URL
+
query
.
toString
();
GitlabRepositoryTree
[]
tree
=
retrieve
().
to
(
tailUrl
,
GitlabRepositoryTree
[].
class
);
...
...
src/main/java/org/gitlab/api/models/GitlabRepositoryTree.java
View file @
ee7bc843
...
...
@@ -7,6 +7,7 @@ public class GitlabRepositoryTree {
private
String
type
;
private
String
mode
;
private
String
id
;
private
String
path
;
public
String
getName
()
{
return
name
;
...
...
@@ -40,4 +41,11 @@ public class GitlabRepositoryTree {
this
.
id
=
id
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
}
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