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
83f000d5
Commit
83f000d5
authored
Jun 14, 2023
by
Jeremie Bresson
Browse files
Merge branch 'main' into 6.x
parents
a221512f
552ac9c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/utils/DurationUtils.java
View file @
83f000d5
...
@@ -107,7 +107,7 @@ public class DurationUtils {
...
@@ -107,7 +107,7 @@ public class DurationUtils {
}
}
}
else
{
}
else
{
buf
.
append
(
' '
).
append
(
seconds
).
append
(
's'
);
buf
.
append
(
seconds
).
append
(
's'
);
}
}
return
(
buf
.
toString
());
return
(
buf
.
toString
());
...
...
src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
View file @
83f000d5
...
@@ -29,6 +29,7 @@ public class EventMergeRequest {
...
@@ -29,6 +29,7 @@ public class EventMergeRequest {
private
String
stCommits
;
private
String
stCommits
;
private
String
stDiffs
;
private
String
stDiffs
;
private
String
state
;
private
String
state
;
private
Long
stateId
;
private
String
targetBranch
;
private
String
targetBranch
;
private
Long
targetProjectId
;
private
Long
targetProjectId
;
private
String
title
;
private
String
title
;
...
@@ -54,17 +55,20 @@ public class EventMergeRequest {
...
@@ -54,17 +55,20 @@ public class EventMergeRequest {
private
String
inProgressMergeCommitSha
;
private
String
inProgressMergeCommitSha
;
private
Integer
lockVersion
;
private
Integer
lockVersion
;
private
Date
last
_e
ditedAt
;
private
Date
last
E
ditedAt
;
private
Long
lastEditedById
;
private
Long
lastEditedById
;
private
Long
headPipelineId
;
private
Long
headPipelineId
;
private
Boolean
refFetched
;
private
Boolean
refFetched
;
private
Long
mergeIid
;
private
Long
mergeIid
;
private
Integer
totalTimeSpent
;
private
Integer
totalTimeSpent
;
private
Duration
humanTotalTimeSpent
;
private
Duration
humanTotalTimeSpent
;
private
Integer
timeChange
;
private
Integer
timeEstimate
;
private
Integer
timeEstimate
;
private
Duration
humanTimeEstimate
;
private
Duration
humanTimeEstimate
;
private
Duration
humanTimeChange
;
private
List
<
Long
>
assigneeIds
;
private
List
<
Long
>
assigneeIds
;
private
List
<
Long
>
reviewerIds
;
private
List
<
Long
>
reviewerIds
;
private
String
oldrev
;
public
Long
getAssigneeId
()
{
public
Long
getAssigneeId
()
{
return
this
.
assigneeId
;
return
this
.
assigneeId
;
...
@@ -218,6 +222,14 @@ public class EventMergeRequest {
...
@@ -218,6 +222,14 @@ public class EventMergeRequest {
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
Long
getStateId
()
{
return
stateId
;
}
public
void
setStateId
(
Long
stateId
)
{
this
.
stateId
=
stateId
;
}
public
String
getTargetBranch
()
{
public
String
getTargetBranch
()
{
return
this
.
targetBranch
;
return
this
.
targetBranch
;
}
}
...
@@ -394,12 +406,12 @@ public class EventMergeRequest {
...
@@ -394,12 +406,12 @@ public class EventMergeRequest {
this
.
lockVersion
=
lockVersion
;
this
.
lockVersion
=
lockVersion
;
}
}
public
Date
getLast
_e
ditedAt
()
{
public
Date
getLast
E
ditedAt
()
{
return
last
_e
ditedAt
;
return
last
E
ditedAt
;
}
}
public
void
setLast
_e
ditedAt
(
Date
last
_e
ditedAt
)
{
public
void
setLast
E
ditedAt
(
Date
last
E
ditedAt
)
{
this
.
last
_e
ditedAt
=
last
_e
ditedAt
;
this
.
last
E
ditedAt
=
last
E
ditedAt
;
}
}
public
Long
getLastEditedById
()
{
public
Long
getLastEditedById
()
{
...
@@ -450,6 +462,14 @@ public class EventMergeRequest {
...
@@ -450,6 +462,14 @@ public class EventMergeRequest {
this
.
humanTotalTimeSpent
=
humanTotalTimeSpent
;
this
.
humanTotalTimeSpent
=
humanTotalTimeSpent
;
}
}
public
Integer
getTimeChange
()
{
return
timeChange
;
}
public
void
setTimeChange
(
Integer
timeChange
)
{
this
.
timeChange
=
timeChange
;
}
public
Integer
getTimeEstimate
()
{
public
Integer
getTimeEstimate
()
{
return
timeEstimate
;
return
timeEstimate
;
}
}
...
@@ -466,6 +486,14 @@ public class EventMergeRequest {
...
@@ -466,6 +486,14 @@ public class EventMergeRequest {
this
.
humanTimeEstimate
=
humanTimeEstimate
;
this
.
humanTimeEstimate
=
humanTimeEstimate
;
}
}
public
Duration
getHumanTimeChange
()
{
return
humanTimeChange
;
}
public
void
setHumanTimeChange
(
Duration
humanTimeChange
)
{
this
.
humanTimeChange
=
humanTimeChange
;
}
public
List
<
Long
>
getAssigneeIds
()
{
public
List
<
Long
>
getAssigneeIds
()
{
return
assigneeIds
;
return
assigneeIds
;
}
}
...
@@ -482,6 +510,14 @@ public class EventMergeRequest {
...
@@ -482,6 +510,14 @@ public class EventMergeRequest {
this
.
reviewerIds
=
reviewerIds
;
this
.
reviewerIds
=
reviewerIds
;
}
}
public
String
getOldrev
()
{
return
oldrev
;
}
public
void
setOldrev
(
String
oldrev
)
{
this
.
oldrev
=
oldrev
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
return
(
JacksonJson
.
toJsonString
(
this
));
...
...
src/test/java/org/gitlab4j/api/TestDuration.java
View file @
83f000d5
...
@@ -112,7 +112,10 @@ public class TestDuration {
...
@@ -112,7 +112,10 @@ public class TestDuration {
@Test
@Test
public
void
testToString
()
{
public
void
testToString
()
{
String
duration
=
DurationUtils
.
toString
(
60
+
1
);
String
duration
=
DurationUtils
.
toString
(
5
);
assertEquals
(
"5s"
,
duration
);
duration
=
DurationUtils
.
toString
(
60
+
1
);
assertEquals
(
"1m1s"
,
duration
);
assertEquals
(
"1m1s"
,
duration
);
duration
=
DurationUtils
.
toString
(
60
*
60
+
60
+
1
);
duration
=
DurationUtils
.
toString
(
60
*
60
+
60
+
1
);
...
...
src/test/resources/org/gitlab4j/api/merge-request-event.json
View file @
83f000d5
...
@@ -112,8 +112,23 @@
...
@@ -112,8 +112,23 @@
"group_id"
:
41
"group_id"
:
41
}
}
],
],
"head_pipeline_id"
:
848574
,
"last_edited_at"
:
"2014-04-03T17:23:34Z"
,
"last_edited_by_id"
:
59
,
"merge_commit_sha"
:
"e3b7e97417fd6318a5c31b21b29d2acc5c86c3ae"
,
"merge_user_id"
:
59
,
"merge_when_pipeline_succeeds"
:
false
,
"state_id"
:
1
,
"time_estimate"
:
0
,
"updated_by_id"
:
6
,
"total_time_spent"
:
0
,
"time_change"
:
0
,
"human_total_time_spent"
:
"30m"
,
"human_time_change"
:
"30s"
,
"human_time_estimate"
:
"30m"
,
"action"
:
"open"
,
"action"
:
"open"
,
"detailed_merge_status"
:
"mergeable"
"detailed_merge_status"
:
"mergeable"
,
"oldrev"
:
"8ad9e9f37b007d15c102da002c2a7133a5ca3737"
},
},
"labels"
:
[
"labels"
:
[
{
{
...
...
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