Skip to content

Commit 14a437f

Browse files
committed
Added missing fields (#241).
1 parent a5ca728 commit 14a437f

File tree

2 files changed

+78
-37
lines changed
  • src
    • main/java/org/gitlab4j/api/models
    • test/resources/org/gitlab4j/api

2 files changed

+78
-37
lines changed

src/main/java/org/gitlab4j/api/models/Job.java

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.gitlab4j.api.models;
22

33
import java.util.Date;
4+
import java.util.List;
5+
46
import javax.xml.bind.annotation.XmlAccessType;
57
import javax.xml.bind.annotation.XmlAccessorType;
68
import javax.xml.bind.annotation.XmlRootElement;
@@ -14,14 +16,17 @@ public class Job {
1416
private String coverage;
1517
private Date createdAt;
1618
private Date finishedAt;
19+
private Date artifactsExpireAt;
1720
private String name;
1821
private Pipeline pipeline;
1922
private String ref;
2023
private Runner runner;
2124
private User user;
2225
private Date startedAt;
2326
private ArtifactsFile artifactsFile;
27+
private List<Artifact> artifacts;
2428
private Boolean tag;
29+
private String webUrl;
2530
private String stage;
2631
private JobStatus status;
2732

@@ -57,6 +62,14 @@ public void setFinishedAt(Date finishedAt) {
5762
this.finishedAt = finishedAt;
5863
}
5964

65+
public Date getArtifactsExpireAt() {
66+
return artifactsExpireAt;
67+
}
68+
69+
public void setArtifactsExpireAt(Date artifactsExpireAt) {
70+
this.artifactsExpireAt = artifactsExpireAt;
71+
}
72+
6073
public String getName() {
6174
return name;
6275
}
@@ -105,6 +118,14 @@ public void setTag(Boolean tag) {
105118
this.tag = tag;
106119
}
107120

121+
public String getWebUrl() {
122+
return webUrl;
123+
}
124+
125+
public void setWebUrl(String webUrl) {
126+
this.webUrl = webUrl;
127+
}
128+
108129
public String getStage() {
109130
return stage;
110131
}
@@ -137,6 +158,14 @@ public void setArtifactsFile(ArtifactsFile artifactsFile) {
137158
this.artifactsFile = artifactsFile;
138159
}
139160

161+
public List<Artifact> getArtifacts() {
162+
return artifacts;
163+
}
164+
165+
public void setArtifacts(List<Artifact> artifacts) {
166+
this.artifacts = artifacts;
167+
}
168+
140169
public Runner getRunner() {
141170
return runner;
142171
}
@@ -145,7 +174,6 @@ public void setRunner(Runner runner) {
145174
this.runner = runner;
146175
}
147176

148-
149177
public Job withId(Integer id) {
150178
this.id = id;
151179
return this;
+49-36
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,52 @@
11
{
2-
"commit": {
3-
"author_email": "[email protected]",
4-
"author_name": "Administrator",
5-
"created_at": "2015-12-24T16:51:14Z",
6-
"id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7-
"message": "Test the CI integration.",
8-
"short_id": "0ff3ae19",
9-
"title": "Test the CI integration."
10-
},
11-
"created_at": "2015-12-24T15:51:21.880Z",
12-
"finished_at": "2015-12-24T17:54:31.198Z",
13-
"id": 8,
14-
"name": "rubocop",
15-
"pipeline": {
16-
"id": 6,
2+
"commit": {
3+
"author_email": "[email protected]",
4+
"author_name": "Administrator",
5+
"created_at": "2015-12-24T16:51:14Z",
6+
"id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7+
"message": "Test the CI integration.",
8+
"short_id": "0ff3ae19",
9+
"title": "Test the CI integration."
10+
},
11+
"created_at": "2015-12-24T15:51:21.802Z",
12+
"artifacts_file": {
13+
"filename": "artifacts.zip",
14+
"size": 1000
15+
},
16+
"artifacts": [
17+
{"file_type": "archive", "size": 1000, "filename": "artifacts.zip", "file_format": "zip"},
18+
{"file_type": "metadata", "size": 186, "filename": "metadata.gz", "file_format": "gzip"},
19+
{"file_type": "trace", "size": 1500, "filename": "job.log", "file_format": "raw"},
20+
{"file_type": "junit", "size": 750, "filename": "junit.xml.gz", "file_format": "gzip"}
21+
],
22+
"finished_at": "2015-12-24T17:54:27.895Z",
23+
"artifacts_expire_at": "2016-01-23T17:54:27.895Z",
24+
"id": 7,
25+
"name": "teaspoon",
26+
"pipeline": {
27+
"id": 6,
28+
"ref": "master",
29+
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
30+
"status": "pending"
31+
},
1732
"ref": "master",
18-
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
19-
"status": "pending"
20-
},
21-
"ref": "master",
22-
"stage": "test",
23-
"started_at": "2015-12-24T17:54:30.733Z",
24-
"status": "failed",
25-
"tag": false,
26-
"user": {
27-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
28-
"created_at": "2015-12-21T13:14:24.077Z",
29-
"id": 1,
30-
"linkedin": "",
31-
"name": "Administrator",
32-
"skype": "",
33-
"state": "active",
34-
"twitter": "",
35-
"username": "root",
36-
"web_url": "http://gitlab.dev/root",
37-
"website_url": ""
38-
}
33+
"artifacts": [],
34+
"stage": "test",
35+
"started_at": "2015-12-24T17:54:27.722Z",
36+
"status": "failed",
37+
"tag": false,
38+
"web_url": "https://example.com/foo/bar/-/jobs/7",
39+
"user": {
40+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
41+
"created_at": "2015-12-21T13:14:24.077Z",
42+
"id": 1,
43+
"linkedin": "",
44+
"name": "Administrator",
45+
"skype": "",
46+
"state": "active",
47+
"twitter": "",
48+
"username": "root",
49+
"web_url": "http://gitlab.dev/root",
50+
"website_url": ""
51+
}
3952
}

0 commit comments

Comments
 (0)