Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
Karina5005 committed Jul 18, 2023
1 parent 816ca24 commit 0929435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backup_github/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ def __get_repositories(self):

def __save_repositories(self, repositories, dir):
for repository in repositories:
if self.api.get_repository(repository)['size'] == 0:
continue
self.__save_repo_content(repository, dir)
repo = self.api.get_repo(repository)
repo = self.api.get_repository(repository)
filter_save(
repo,
["id", "name", "private", "fork", "default_branch", "visibility"],
Expand Down
2 changes: 1 addition & 1 deletion backup_github/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_member_status(self, member_login):
f"https://api.github.com/orgs/{self.organization}/memberships/{member_login}"
)

def get_repo(self, repo_name):
def get_repository(self, repo_name):
return self.make_request(
f"https://api.github.com/repos/{self.organization}/{repo_name}"
)
Expand Down

0 comments on commit 0929435

Please sign in to comment.