From 0d8a504b024a73096f00175ffbac51a8100cf08c Mon Sep 17 00:00:00 2001 From: Rodos Date: Wed, 21 Jan 2026 21:12:03 +1100 Subject: [PATCH] Fix KeyError: 'Private' when using --all flag (#481) The repository dictionary uses lowercase "private" key. Use .get() with the correct case to match the pattern used elsewhere in the codebase. The bug only affects --all users since --security-advisories short-circuits before the key access. --- github_backup/github_backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_backup/github_backup.py b/github_backup/github_backup.py index 346d541..0b7e1f8 100644 --- a/github_backup/github_backup.py +++ b/github_backup/github_backup.py @@ -1814,7 +1814,7 @@ def backup_repositories(args, output_directory, repositories): if args.include_milestones or args.include_everything: backup_milestones(args, repo_cwd, repository, repos_template) - if args.include_security_advisories or (args.include_everything and not repository["Private"]): + if args.include_security_advisories or (args.include_everything and not repository.get("private", False)): backup_security_advisories(args, repo_cwd, repository, repos_template) if args.include_labels or args.include_everything: