Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
d260ce9b
Commit
d260ce9b
authored
Jul 26, 2017
by
Greg Messner
Committed by
GitHub
Jul 26, 2017
Browse files
Fixed getCommits() example.
parent
44df0ed8
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d260ce9b
...
@@ -98,8 +98,11 @@ Sub API Examples
...
@@ -98,8 +98,11 @@ Sub API Examples
CommitsApi:
CommitsApi:
```
java
```
java
// Get a list of commits associated with the specified branch
// Get a list of commits associated with the specified branch that fall within the specified time window
List
<
Commit
>
commits
=
gitLabApi
.
getCommitsApi
().
getCommits
(
1234
,
"new-feature"
);
// This uses the ISO8601 date utilities the in org.gitlab4j.api.utils.ISO8601 class
Date
since
=
ISO8601
.
toDate
(
"2017-01-01T00:00:00Z"
);
Date
until
=
new
Date
();
// now
List
<
Commit
>
commits
=
gitLabApi
.
getCommitsApi
().
getCommits
(
1234
,
"new-feature"
,
since
,
until
);
```
```
GroupApi:
GroupApi:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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