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
a7de94cf
Unverified
Commit
a7de94cf
authored
Apr 25, 2020
by
Ganesh Datta
Committed by
GitHub
Apr 25, 2020
Browse files
Update commit API to be conformant to spec (#556)
parent
ede2903d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/Commit.java
View file @
a7de94cf
...
@@ -25,6 +25,7 @@ public class Commit {
...
@@ -25,6 +25,7 @@ public class Commit {
private
Date
timestamp
;
private
Date
timestamp
;
private
String
title
;
private
String
title
;
private
String
url
;
private
String
url
;
private
String
webUrl
;
private
Pipeline
lastPipeline
;
private
Pipeline
lastPipeline
;
public
Author
getAuthor
()
{
public
Author
getAuthor
()
{
...
@@ -163,6 +164,14 @@ public class Commit {
...
@@ -163,6 +164,14 @@ public class Commit {
this
.
url
=
url
;
this
.
url
=
url
;
}
}
public
String
getwebUrl
()
{
return
webUrl
;
}
public
void
setwebUrl
(
String
webUrl
)
{
this
.
webUrl
=
webUrl
;
}
public
Pipeline
getLastPipeline
()
{
public
Pipeline
getLastPipeline
()
{
return
lastPipeline
;
return
lastPipeline
;
}
}
...
...
src/test/resources/org/gitlab4j/api/commit.json
View file @
a7de94cf
...
@@ -18,5 +18,7 @@
...
@@ -18,5 +18,7 @@
"deletions"
:
10
,
"deletions"
:
10
,
"total"
:
25
"total"
:
25
},
},
"status"
:
"running"
"status"
:
"running"
,
"url"
:
"http://localhost/diaspora/diaspora-project-site/-/commit/9df4dd1f0dfae80c05eac4b2bd461b86db5c8e2d"
,
"web_url"
:
"http://localhost/diaspora/diaspora-project-site/-/commit/9df4dd1f0dfae80c05eac4b2bd461b86db5c8e2d"
}
}
src/test/resources/org/gitlab4j/api/event.json
View file @
a7de94cf
{
{
"title"
:
"this is a title"
,
"title"
:
"this is a title"
,
"project_id"
:
15
,
"project_id"
:
15
,
"action_name"
:
"
open
ed"
,
"action_name"
:
"
push
ed"
,
"target_id"
:
830
,
"target_id"
:
830
,
"target_type"
:
"
Issue
"
,
"target_type"
:
"
MergeRequest
"
,
"author_id"
:
1
,
"author_id"
:
1
,
"author"
:
{
"author"
:
{
"name"
:
"Dmitriy Zaporozhets"
,
"name"
:
"Dmitriy Zaporozhets"
,
...
@@ -40,5 +40,14 @@
...
@@ -40,5 +40,14 @@
],
],
"total_commits_count"
:
1
"total_commits_count"
:
1
},
},
"target_title"
:
"target title"
"push_data"
:
{
"commit_count"
:
1
,
"action"
:
"pushed"
,
"ref_type"
:
"branch"
,
"commit_from"
:
"50d4420237a9de7be1304607147aec22e4a14af7"
,
"commit_to"
:
"c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"ref"
:
"master"
,
"commit_title"
:
"Add simple search to projects in public area"
},
"target_title"
:
"target title"
}
}
\ No newline at end of file
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