Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: allow empty GitHub repositories (#18776)

buua4369fdcc02c5f05
diff --git a/common/data_source/github/connector.py b/common/data_source/github/connector.py
index 76b7c69c9a..6c6b523ddd 100644
--- a/common/data_source/github/connector.py
+++ b/common/data_source/github/connector.py
@@ -702,9 +702,8 @@ class GithubConnector(CheckpointedConnectorWithPermSyncGH[GithubConnectorCheckpo
continue
try:
- test_repo = self.github_client.get_repo(f"{self.repo_owner}/{repo_name}")
+ self.github_client.get_repo(f"{self.repo_owner}/{repo_name}")
logging.info(f"Successfully accessed repository: {self.repo_owner}/{repo_name}")
- test_repo.get_contents("")
valid_repos = True
# If at least one repo is valid, we can proceed
break
@@ -717,8 +716,7 @@ class GithubConnector(CheckpointedConnectorWithPermSyncGH[GithubConnectorCheckpo
raise ConnectorValidationError(error_msg)
else:
# Single repository (backward compatibility)
- test_repo = self.github_client.get_repo(f"{self.repo_owner}/{self.repositories}")
- test_repo.get_contents("")
+ self.github_client.get_repo(f"{self.repo_owner}/{self.repositories}")
else:
# Try to get organization first
try: