File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
main/java/org/gitlab4j/api/models
test/resources/org/gitlab4j/api Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public class Job {
1212 private String coverage ;
1313 private Date createdAt ;
1414 private Date finishedAt ;
15+ private Date erasedAt ;
1516 private Date artifactsExpireAt ;
1617 private String name ;
1718 private Pipeline pipeline ;
@@ -64,6 +65,23 @@ public void setFinishedAt(Date finishedAt) {
6465 this .finishedAt = finishedAt ;
6566 }
6667
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+
6785 public Date getArtifactsExpireAt () {
6886 return artifactsExpireAt ;
6987 }
@@ -248,6 +266,11 @@ public Job withFinishedAt(Date finishedAt) {
248266 return this ;
249267 }
250268
269+ public Job withErasedAt (Date erasedAt ) {
270+ this .erasedAt = erasedAt ;
271+ return this ;
272+ }
273+
251274 public Job withName (String name ) {
252275 this .name = name ;
253276 return this ;
Original file line number Diff line number Diff line change 3737 "tag" : false ,
3838 "web_url" : " https://example.com/foo/bar/-/jobs/7" ,
3939 "allow_failure" : false ,
40+ "erased_at" : " 2016-01-11T11:30:19.914Z" ,
4041 "duration" : 0.465 ,
4142 "queued_duration" : 0.010 ,
4243 "user" : {
You can’t perform that action at this time.
0 commit comments