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

Add "created_at" in package #1017

Merged
merged 1 commit into from
Aug 16, 2023
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
11 changes: 11 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Package.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.gitlab4j.api.models;

import java.util.Date;

import org.gitlab4j.api.utils.JacksonJson;

public class Package {
Expand All @@ -8,6 +10,7 @@ public class Package {
private String name;
private String version;
private PackageType packageType;
private Date createdAt;

public Long getId() {
return id;
Expand Down Expand Up @@ -41,6 +44,14 @@ public void setPackageType(PackageType packageType) {
this.packageType = packageType;
}

public Date getCreatedAt() {
return createdAt;
}

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

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
6 changes: 4 additions & 2 deletions src/test/resources/org/gitlab4j/api/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"id": 1,
"name": "com/mycompany/my-app",
"version": "1.0-SNAPSHOT",
"package_type": "maven"
"package_type": "maven",
"created_at": "2012-10-22T14:13:35Z"
},
{
"id": 2,
"name": "@foo/bar",
"version": "1.0.3",
"package_type": "npm"
"package_type": "npm",
"created_at": "2012-10-22T14:13:35Z"
}
]
Loading