File tree 2 files changed +24
-0
lines changed
main/java/org/gitlab4j/api/models
test/resources/org/gitlab4j/api
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public class Job {
12
12
private String coverage ;
13
13
private Date createdAt ;
14
14
private Date finishedAt ;
15
+ private Date erasedAt ;
15
16
private Date artifactsExpireAt ;
16
17
private String name ;
17
18
private Pipeline pipeline ;
@@ -64,6 +65,23 @@ public void setFinishedAt(Date finishedAt) {
64
65
this .finishedAt = finishedAt ;
65
66
}
66
67
68
+ /**
69
+ * When someone deletes job using
70
+ * <a href="https://docs.gitlab.com/ee/api/jobs.html#erase-a-job">job erase api</a>, you can
71
+ * detect it using this field. Normally erasing job does mean only that job artifacts and
72
+ * a job logs gets removed. Job metadata (started_at, duration, ....) stays in place.
73
+ *
74
+ * You can use this attribute to filter out such jobs, that have erased at non-null if you need
75
+ * to.
76
+ */
77
+ public Date getErasedAt () {
78
+ return erasedAt ;
79
+ }
80
+
81
+ public void setErasedAt (Date erasedAt ) {
82
+ this .erasedAt = erasedAt ;
83
+ }
84
+
67
85
public Date getArtifactsExpireAt () {
68
86
return artifactsExpireAt ;
69
87
}
@@ -248,6 +266,11 @@ public Job withFinishedAt(Date finishedAt) {
248
266
return this ;
249
267
}
250
268
269
+ public Job withErasedAt (Date erasedAt ) {
270
+ this .erasedAt = erasedAt ;
271
+ return this ;
272
+ }
273
+
251
274
public Job withName (String name ) {
252
275
this .name = name ;
253
276
return this ;
Original file line number Diff line number Diff line change 37
37
"tag" : false ,
38
38
"web_url" : " https://example.com/foo/bar/-/jobs/7" ,
39
39
"allow_failure" : false ,
40
+ "erased_at" : " 2016-01-11T11:30:19.914Z" ,
40
41
"duration" : 0.465 ,
41
42
"queued_duration" : 0.010 ,
42
43
"user" : {
You can’t perform that action at this time.
0 commit comments