Skip to content

Commit a00b1f0

Browse files
authored
Support X-Gitlab-Content-Sha256 header (#904)
1 parent 73f200a commit a00b1f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/gitlab4j/api/RepositoryFileApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public RepositoryFile getFileInfo(Object projectIdOrPath, String filePath, Strin
7171
RepositoryFile file = new RepositoryFile();
7272
file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id"));
7373
file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id"));
74+
file.setContentSha256(response.getHeaderString("X-Gitlab-Content-Sha256"));
7475

7576
String encoding = response.getHeaderString("X-Gitlab-Encoding");
7677
file.setEncoding(Constants.Encoding.forValue(encoding));
@@ -515,4 +516,4 @@ public Pager<Blame> getBlame(Object projectIdOrPath, String filePath, String ref
515516
public Stream<Blame> getBlameStream(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException {
516517
return (getBlame(projectIdOrPath, filePath, ref, getDefaultPerPage()).stream());
517518
}
518-
}
519+
}

0 commit comments

Comments
 (0)