Read private repositories only with the user's own GitHub token

GITHUB_ACCESS_TOKEN belongs to the server, but any user could ingest any
repository it can see, private ones included. It is now used only for
public repositories; the loader checks the repository's visibility first
and asks for a GitHub connection otherwise.

The loader also takes a token from the connection a source syncs from.
Merging a connection's keys into a plain repository URL no longer fails
on json.loads, manual Sync now passes the source's connection, and a
token GitHub rejects pauses the connection's sources for reconnect.
This commit is contained in:
arc53-machine committed 2026-09-29 10:41:03 +01:00
1 parent 35d6d80e87
commit 3572d968ec
9 files changed
+357 -22

No files matched your search

+2
View File
@@ -277,6 +277,7 @@ def sync_source(
sync_frequency,
retriever,
doc_id,
connection_id=None,
):
resp = sync(
self,
@@ -287,6 +288,7 @@ def sync_source(
sync_frequency,
retriever,
doc_id,
connection_id=connection_id,
)
return resp