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
7420c35a
Unverified
Commit
7420c35a
authored
Nov 16, 2023
by
Jérémie Bresson
Committed by
GitHub
Nov 16, 2023
Browse files
Fix Milestone class (#1060)
parent
f2fe6932
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/Milestone.java
View file @
7420c35a
...
...
@@ -4,11 +4,15 @@ import java.util.Date;
import
org.gitlab4j.api.utils.JacksonJson
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
public
class
Milestone
{
private
Date
createdAt
;
private
String
description
;
@JsonSerialize
(
using
=
JacksonJson
.
DateOnlySerializer
.
class
)
private
Date
startDate
;
@JsonSerialize
(
using
=
JacksonJson
.
DateOnlySerializer
.
class
)
private
Date
dueDate
;
private
Long
id
;
private
Long
iid
;
...
...
@@ -17,6 +21,8 @@ public class Milestone {
private
String
state
;
private
String
title
;
private
Date
updatedAt
;
private
Boolean
expired
;
private
String
webUrl
;
public
Date
getCreatedAt
()
{
return
this
.
createdAt
;
...
...
@@ -106,6 +112,22 @@ public class Milestone {
this
.
updatedAt
=
updatedAt
;
}
public
Boolean
getExpired
()
{
return
expired
;
}
public
void
setExpired
(
Boolean
expired
)
{
this
.
expired
=
expired
;
}
public
String
getWebUrl
()
{
return
webUrl
;
}
public
void
setWebUrl
(
String
webUrl
)
{
this
.
webUrl
=
webUrl
;
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
...
...
src/test/resources/org/gitlab4j/api/milestone-group.json
View file @
7420c35a
...
...
@@ -4,8 +4,8 @@
"group_id"
:
14
,
"title"
:
"10.0"
,
"description"
:
"Version"
,
"start_date"
:
"2013-11-01
T00:00:00Z
"
,
"due_date"
:
"2013-11-29
T00:00:00Z
"
,
"start_date"
:
"2013-11-01"
,
"due_date"
:
"2013-11-29"
,
"state"
:
"active"
,
"updated_at"
:
"2013-10-02T09:24:18Z"
,
"created_at"
:
"2013-10-02T09:24:18Z"
...
...
src/test/resources/org/gitlab4j/api/milestone.json
View file @
7420c35a
{
"id"
:
12
,
"iid"
:
3
,
"project_id"
:
16
,
"title"
:
"10.0"
,
"description"
:
"Version"
,
"start_date"
:
"2013-11-01T00:00:00Z"
,
"due_date"
:
"2013-11-29T00:00:00Z"
,
"state"
:
"active"
,
"updated_at"
:
"2013-10-02T09:24:18Z"
,
"created_at"
:
"2013-10-02T09:24:18Z"
"id"
:
12
,
"iid"
:
3
,
"project_id"
:
16
,
"title"
:
"1.0"
,
"description"
:
"Version"
,
"state"
:
"active"
,
"created_at"
:
"2013-10-02T09:24:18Z"
,
"updated_at"
:
"2013-10-02T09:24:18Z"
,
"due_date"
:
"2013-11-29"
,
"start_date"
:
"2013-11-01"
,
"expired"
:
false
,
"web_url"
:
"http://gitlab.example.com/my-group/my-project/-/milestones/3"
}
src/test/resources/org/gitlab4j/api/releases.json
View file @
7420c35a
...
...
@@ -40,8 +40,8 @@
"state"
:
"closed"
,
"created_at"
:
"2019-07-12T19:45:44.256Z"
,
"updated_at"
:
"2019-07-12T19:45:44.256Z"
,
"due_date"
:
"2019-08-16
T11:00:00.256Z
"
,
"start_date"
:
"2019-07-30
T12:00:00.256Z
"
"due_date"
:
"2019-08-16"
,
"start_date"
:
"2019-07-30"
},
{
"id"
:
52
,
...
...
@@ -52,8 +52,8 @@
"state"
:
"closed"
,
"created_at"
:
"2019-07-16T14:00:12.256Z"
,
"updated_at"
:
"2019-07-16T14:00:12.256Z"
,
"due_date"
:
"2019-08-16
T11:00:00.256Z
"
,
"start_date"
:
"2019-07-30
T12:00:00.256Z
"
"due_date"
:
"2019-08-16"
,
"start_date"
:
"2019-07-30"
}
],
"commit_path"
:
"/root/awesome-app/commit/588440f66559714280628a4f9799f0c4eb880a4a"
,
...
...
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