Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added createAt attribute in Tag class #1163

Merged
merged 2 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
Loading