From a78f0f586e4b6d5806b982ce963b66592e44613f Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 20 Nov 2025 12:30:22 -0500 Subject: [PATCH] fix: Create GitHub siblings if enabled --- services/datalad/datalad_service/common/github.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/datalad/datalad_service/common/github.py b/services/datalad/datalad_service/common/github.py index 18425eb9e..4f5077571 100644 --- a/services/datalad/datalad_service/common/github.py +++ b/services/datalad/datalad_service/common/github.py @@ -11,9 +11,10 @@ def create_github_repo(dataset_path, dataset_id): """Setup a github sibling / remote.""" + if not DATALAD_GITHUB_EXPORTS_ENABLED: + return try: - if not DATALAD_GITHUB_EXPORTS_ENABLED: - return create_sibling_github(dataset_path, dataset_id) + return create_sibling_github(dataset_path, dataset_id) except KeyError: raise Exception( 'DATALAD_GITHUB_TOKEN and DATALAD_GITHUB_ORG must be defined to create remote repos'