Skip to content

Commit

Permalink
Add sha256 field in package file (gitlab4j#1141)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Valentin Manea <[email protected]>
Co-authored-by: Jeremie Bresson <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2024
1 parent 9f969f8 commit 7a224e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/gitlab4j/api/models/PackageFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class PackageFile implements Serializable {
private Long size;
private String fileMd5;
private String fileSha1;
private String fileSha256;

public Long getId() {
return id;
Expand Down Expand Up @@ -93,6 +94,14 @@ public void setFileSha1(String fileSha1) {
this.fileSha1 = fileSha1;
}

public String getFileSha256() {
return fileSha256;
}

public void setFileSha256(String fileSha256) {
this.fileSha256 = fileSha256;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
9 changes: 6 additions & 3 deletions src/test/resources/org/gitlab4j/api/package-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"file_name": "my-app-1.5-20181107.152550-1.jar",
"size": 2421,
"file_md5": "58e6a45a629910c6ff99145a688971ac",
"file_sha1": "ebd193463d3915d7e22219f52740056dfd26cbfe"
"file_sha1": "ebd193463d3915d7e22219f52740056dfd26cbfe",
"file_sha256": "e677d33156215f1afa15c934a4ebd1162c62d0ae0e70d2510b6bc75e651c27b8"
},
{
"id": 26,
Expand All @@ -15,7 +16,8 @@
"file_name": "my-app-1.5-20181107.152550-1.pom",
"size": 1122,
"file_md5": "d90f11d851e17c5513586b4a7e98f1b2",
"file_sha1": "9608d068fe88aff85781811a42f32d97feb440b5"
"file_sha1": "9608d068fe88aff85781811a42f32d97feb440b5",
"file_sha256": "621dc7c0a151ab80895237868421eb5708c5285bf88b5ceeac3d77d5be11512b"
},
{
"id": 27,
Expand All @@ -24,6 +26,7 @@
"file_name": "maven-metadata.xml",
"size": 767,
"file_md5": "6dfd0cce1203145a927fef5e3a1c650c",
"file_sha1": "d25932de56052d320a8ac156f745ece73f6a8cd2"
"file_sha1": "d25932de56052d320a8ac156f745ece73f6a8cd2",
"file_sha256": "c3e051898b0fb347553424d7947127905b4649961463f8627003f5ce7a6f750c"
}
]

0 comments on commit 7a224e3

Please sign in to comment.