This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new cbdabccd6b NIFI-13485 Use readBlob when reading content in 
GitHubRepositoryClient
cbdabccd6b is described below

commit cbdabccd6bee5534e593327f273614279bd0e980
Author: Bryan Bende <[email protected]>
AuthorDate: Wed Jul 10 14:05:37 2024 -0400

    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 <[email protected]>
---
 .../src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
 
b/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
index 3b4805d52f..17a4298512 100644
--- 
a/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
+++ 
b/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
@@ -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);
             }

Reply via email to