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
2d2fe244
Unverified
Commit
2d2fe244
authored
Apr 20, 2023
by
Vimsucks
Committed by
GitHub
Apr 19, 2023
Browse files
Add headPipeline to MergeRequest (#890)
Co-authored-by:
Jérémie Bresson
<
dev@jmini.fr
>
parent
c2929237
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/MergeRequest.java
View file @
2d2fe244
...
@@ -54,6 +54,7 @@ public class MergeRequest {
...
@@ -54,6 +54,7 @@ public class MergeRequest {
private
String
mergeError
;
private
String
mergeError
;
private
Milestone
milestone
;
private
Milestone
milestone
;
private
Pipeline
pipeline
;
private
Pipeline
pipeline
;
private
Pipeline
headPipeline
;
private
Long
projectId
;
private
Long
projectId
;
private
String
sha
;
private
String
sha
;
private
Boolean
shouldRemoveSourceBranch
;
private
Boolean
shouldRemoveSourceBranch
;
...
@@ -374,6 +375,14 @@ public class MergeRequest {
...
@@ -374,6 +375,14 @@ public class MergeRequest {
this
.
pipeline
=
pipeline
;
this
.
pipeline
=
pipeline
;
}
}
public
Pipeline
getHeadPipeline
()
{
return
headPipeline
;
}
public
void
setHeadPipeline
(
Pipeline
headPipeline
)
{
this
.
headPipeline
=
headPipeline
;
}
public
Long
getProjectId
()
{
public
Long
getProjectId
()
{
return
projectId
;
return
projectId
;
}
}
...
...
src/main/java/org/gitlab4j/api/models/Pipeline.java
View file @
2d2fe244
...
@@ -8,6 +8,7 @@ import org.gitlab4j.api.utils.JacksonJson;
...
@@ -8,6 +8,7 @@ import org.gitlab4j.api.utils.JacksonJson;
public
class
Pipeline
{
public
class
Pipeline
{
private
Long
id
;
private
Long
id
;
private
Long
projectId
;
private
PipelineStatus
status
;
private
PipelineStatus
status
;
private
String
ref
;
private
String
ref
;
private
String
sha
;
private
String
sha
;
...
@@ -34,6 +35,14 @@ public class Pipeline {
...
@@ -34,6 +35,14 @@ public class Pipeline {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Long
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Long
projectId
)
{
this
.
projectId
=
projectId
;
}
public
PipelineStatus
getStatus
()
{
public
PipelineStatus
getStatus
()
{
return
status
;
return
status
;
}
}
...
...
src/test/resources/org/gitlab4j/api/merge-request.json
View file @
2d2fe244
...
@@ -74,5 +74,34 @@
...
@@ -74,5 +74,34 @@
"blocking_discussions_resolved"
:
true
,
"blocking_discussions_resolved"
:
true
,
"diverged_commits_count"
:
2
,
"diverged_commits_count"
:
2
,
"latest_build_started_at"
:
"2018-09-07T07:27:38.472Z"
,
"latest_build_started_at"
:
"2018-09-07T07:27:38.472Z"
,
"latest_build_finished_at"
:
"2018-09-07T08:07:06.012Z"
"latest_build_finished_at"
:
"2018-09-07T08:07:06.012Z"
,
"head_pipeline"
:
{
"id"
:
1
,
"project_id"
:
3
,
"sha"
:
"2be7ddb704c7b6b83732fdd5b9f09d5a397b5f8f"
,
"ref"
:
"test1"
,
"status"
:
"pending"
,
"created_at"
:
"2018-09-07T07:27:38.472Z"
,
"updated_at"
:
"2018-09-07T07:27:38.472Z"
,
"web_url"
:
"https://www.google.com/"
,
"before_sha"
:
"0000000000000000000000000000000000000000"
,
"tag"
:
false
,
"user"
:
{
"id"
:
1
,
"username"
:
"admin"
,
"state"
:
"active"
,
"email"
:
"admin@local.host"
,
"name"
:
"Administrator"
},
"detailed_status"
:
{
"icon"
:
"status_pending"
,
"text"
:
"pending"
,
"label"
:
"pending"
,
"group"
:
"pending"
,
"tooltip"
:
"pending"
,
"has_details"
:
true
,
"details_path"
:
"/my-group/my-project/-/pipelines/1"
,
"favicon"
:
"https://www.google.com/"
}
}
}
}
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