Unverified Commit 384dcfa9 authored by Jérémie Bresson's avatar Jérémie Bresson Committed by GitHub
Browse files

Add missing fields on commit and pipeline (#959)

parent 2f85b815
......@@ -26,6 +26,7 @@ public class Commit {
private String title;
private String url;
private String webUrl;
private Long projectId;
private Pipeline lastPipeline;
public Author getAuthor() {
......@@ -172,6 +173,14 @@ public class Commit {
this.webUrl = webUrl;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Pipeline getLastPipeline() {
return lastPipeline;
}
......
......@@ -8,8 +8,10 @@ import org.gitlab4j.api.utils.JacksonJson;
public class Pipeline {
private Long id;
private Long iid;
private Long projectId;
private PipelineStatus status;
private String source;
private String ref;
private String sha;
private String beforeSha;
......@@ -35,6 +37,14 @@ public class Pipeline {
this.id = id;
}
public Long getIid() {
return iid;
}
public void setIid(Long iid) {
this.iid = iid;
}
public Long getProjectId() {
return projectId;
}
......@@ -51,6 +61,14 @@ public class Pipeline {
this.status = status;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getRef() {
return ref;
}
......
......@@ -20,5 +20,18 @@
},
"status": "running",
"url": "http://localhost/diaspora/diaspora-project-site/-/commit/9df4dd1f0dfae80c05eac4b2bd461b86db5c8e2d",
"web_url": "http://localhost/diaspora/diaspora-project-site/-/commit/9df4dd1f0dfae80c05eac4b2bd461b86db5c8e2d"
"web_url": "http://localhost/diaspora/diaspora-project-site/-/commit/9df4dd1f0dfae80c05eac4b2bd461b86db5c8e2d",
"project_id": 15,
"last_pipeline": {
"id": 16282,
"iid": 688,
"project_id": 15,
"sha": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
"ref": "patch-1",
"status": "success",
"source": "external",
"created_at": "2023-04-03T21:17:04.026Z",
"updated_at": "2023-04-03T21:17:04.157Z",
"web_url": "http://localhost/diaspora/diaspora-project-site/-/pipelines/16282"
}
}
{
"id": 46,
"iid": 11,
"project_id": 1,
"status": "success",
"web_url": "http://3cb4fb3163d4/gitlab4j/test-project/pipelines/66",
"ref": "master",
"ref": "main",
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"tag": false,
"yaml_errors": "Included file `.gitlab-ci.yml` does not have valid YAML syntax!",
"user": {
"name": "Administrator",
"username": "root",
......@@ -17,7 +19,7 @@
"created_at": "2016-08-11T11:28:34.085Z",
"updated_at": "2016-08-11T11:32:35.169Z",
"finished_at": "2016-08-11T11:32:35.145Z",
"coverage": "30.0",
"duration": 123,
"queued_duration": 0.010,
"detailed_status": {
"icon": "status_pending",
......@@ -28,5 +30,7 @@
"has_details": true,
"details_path": "/gitlab4j/test-project/pipelines/66",
"favicon": "/assets/ci_favicons/favicon_status_pending-5bdf338420e5221ca24353b6bff1c9367189588750632e9a871b7af09ff6a2ae.png"
}
},
"coverage": "30.0",
"web_url": "https://example.com/foo/bar/pipelines/46"
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment