Skip to content

Commit

Permalink
Added createAt attribute in Tag class (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhanlc56 authored Sep 21, 2024
1 parent f853d92 commit f9f4abf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
10 changes: 10 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Tag.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.gitlab4j.api.models;

import java.util.Date;
import org.gitlab4j.api.utils.JacksonJson;

import java.io.Serializable;
Expand All @@ -11,6 +12,7 @@ public class Tag implements Serializable {
private String message;
private String name;
private Release release;
private Date createdAt;

public Commit getCommit() {
return this.commit;
Expand Down Expand Up @@ -44,6 +46,14 @@ public void setRelease(Release release) {
this.release = release;
}

public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
39 changes: 20 additions & 19 deletions src/test/resources/org/gitlab4j/api/tag.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"commit": {
"author_name": "John Smith",
"author_email": "[email protected]",
"authored_date": "2012-05-28T04:42:42Z",
"committed_date": "2012-05-28T04:42:42Z",
"committer_name": "Jack Smith",
"committer_email": "[email protected]",
"id": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": "Initial commit",
"parent_ids": [
"2a4b78934375d7f53875269ffd4f45fd83a84ebe"
]
},
"release": {
"tag_name": "1.0.0",
"description": "Amazing release. Wow"
},
"name": "v1.0.0"
}
"commit": {
"author_name": "John Smith",
"author_email": "[email protected]",
"authored_date": "2012-05-28T04:42:42Z",
"committed_date": "2012-05-28T04:42:42Z",
"committer_name": "Jack Smith",
"committer_email": "[email protected]",
"id": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": "Initial commit",
"parent_ids": [
"2a4b78934375d7f53875269ffd4f45fd83a84ebe"
]
},
"release": {
"tag_name": "1.0.0",
"description": "Amazing release. Wow"
},
"name": "v1.0.0",
"created_at": "2024-08-13T16:53:30Z"
}

0 comments on commit f9f4abf

Please sign in to comment.