MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / ensure_github_connected_for_sponsors

Function ensure_github_connected_for_sponsors

Scripts/Settings.py:1468–1492  ·  view source on GitHub ↗

Uses the existing gh login flow before accessing Sponsors-Only content.

()

Source from the content-addressed store, hash-verified

1466
1467 return sorted(repo_sources, key=sort_key), size_map
1468
1469
1470def _delete_existing_project_save_archives():
1471 archive_name = PROJECT_SAVE_ARCHIVE_NAME
1472 for current_root, _dirnames, filenames in os.walk(PROJECT_SAVE_SHARED_STORAGE_PATH, onerror=lambda _e: None):
1473 for filename in filenames:
1474 if filename == archive_name:
1475 _remove_path_if_exists(os.path.join(current_root, filename))
1476
1477
1478def _get_project_save_extra_copy_directories(max_count=PROJECT_SAVE_MAX_EXTRA_COPIES):
1479 extra_directories = []
1480 try:
1481 entries = sorted(os.listdir(PROJECT_SAVE_SHARED_STORAGE_PATH), key=str.lower)
1482 except Exception:
1483 return extra_directories
1484
1485 for entry in entries:
1486 if entry.startswith('.') or entry in PROJECT_SAVE_EXCLUDED_TOP_LEVEL_DIRS:
1487 continue
1488
1489 full_path = os.path.join(PROJECT_SAVE_SHARED_STORAGE_PATH, entry)
1490 if not os.path.isdir(full_path):
1491 continue
1492
1493 extra_directories.append(full_path)
1494 if len(extra_directories) >= max_count:
1495 break

Callers 1

Calls 9

printFunction · 0.85
inputFunction · 0.85
github_cli_availableFunction · 0.70
github_auth_statusFunction · 0.70
github_current_usernameFunction · 0.70
_Function · 0.70
connect_github_accountFunction · 0.70

Tested by

no test coverage detected