mirror of
https://github.com/apache/nifi.git
synced 2025-03-03 16:09:19 +00:00
NIFI-13485 Use readBlob when reading content in GitHubRepositoryClient
- The readBlob method avoids issues with 1 MB limits on alternative getContent requests This closes #9067 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
3b2120e6c6
commit
cbdabccd6b
@ -212,7 +212,7 @@ public class GitHubRepositoryClient {
|
||||
return execute(() -> {
|
||||
try {
|
||||
final GHContent ghContent = repository.getFileContent(resolvedPath, branchRef);
|
||||
return ghContent.read();
|
||||
return repository.readBlob(ghContent.getSha());
|
||||
} catch (final FileNotFoundException fnf) {
|
||||
throwPathOrBranchNotFound(fnf, resolvedPath, branchRef);
|
||||
return null;
|
||||
@ -238,7 +238,7 @@ public class GitHubRepositoryClient {
|
||||
return execute(() -> {
|
||||
try {
|
||||
final GHContent ghContent = repository.getFileContent(resolvedPath, commitSha);
|
||||
return ghContent.read();
|
||||
return repository.readBlob(ghContent.getSha());
|
||||
} catch (final FileNotFoundException fnf) {
|
||||
throw new FlowRegistryException("Path [" + resolvedPath + "] or Commit [" + commitSha + "] not found", fnf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user