Commit 0179856e authored by Greg Messner's avatar Greg Messner
Browse files

Added content_sha256 field (#455).

parent 09551c7e
......@@ -15,6 +15,7 @@ public class RepositoryFile {
private Integer size;
private Encoding encoding;
private String content;
private String contentSha256;
private String ref;
private String blobId;
private String commitId;
......@@ -60,6 +61,14 @@ public class RepositoryFile {
this.content = content;
}
public String getContentSha256() {
return contentSha256;
}
public void setContentSha256(String contentSha256) {
this.contentSha256 = contentSha256;
}
public String getRef() {
return ref;
}
......
......@@ -82,6 +82,7 @@ import org.gitlab4j.api.models.ProtectedBranch;
import org.gitlab4j.api.models.ProtectedTag;
import org.gitlab4j.api.models.PushRules;
import org.gitlab4j.api.models.RegistryRepository;
import org.gitlab4j.api.models.RepositoryFile;
import org.gitlab4j.api.models.Runner;
import org.gitlab4j.api.models.RunnerDetail;
import org.gitlab4j.api.models.SearchBlob;
......@@ -405,6 +406,12 @@ public class TestGitLabApiBeans {
assertTrue(compareJson(repos, "registry-repositories.json"));
}
@Test
public void testRepositoryFile() throws Exception {
RepositoryFile file = unmarshalResource(RepositoryFile.class, "repository-file.json");
assertTrue(compareJson(file, "repository-file.json"));
}
@Test
public void testRunnerDetail() throws Exception {
RunnerDetail runnerDetail = unmarshalResource(RunnerDetail.class, "runner-detail.json");
......
{
"file_name": "key.rb",
"file_path": "app/models/key.rb",
"size": 1476,
"encoding": "base64",
"content": "IyA9PSBTY2hlbWEgSW5mb3...",
"content_sha256": "4c294617b60715c1d218e61164a3abd4808a4284cbc30e6728a01ad9aada4481",
"ref": "master",
"blob_id": "79f7bbd25901e8334750839545a9bd021f0e4c83",
"commit_id": "d5a3ff139356ce33e37e73add446f16869741b50",
"last_commit_id": "570e7b2abdd848b95f2f578043fc23bd6f6fd24d"
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment