Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ForgejoRepoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
User,
WikiPage,
logging,
WorkflowRun
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkflowRun,

)


Expand Down Expand Up @@ -329,6 +330,9 @@ def get_invites(self, repo: Repository, users: list[User] = None) -> list[Invite
def get_rate_limiting(self) -> tuple[int, int]:
return sys.maxsize, sys.maxsize

def get_workflow_runs(self, repo) -> list[WorkflowRun]:
return []

def get_base_url(self) -> str:
return self.client.base_url

Expand Down
4 changes: 2 additions & 2 deletions git_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def get_next_binded_repo(clients: Clients, repositories: list[str]):
client, token = clients.get_next_client()
repo = client.get_repository(repo_name)
except Exception as err:
print(f'get_next_binded_repo(): error {err}')
print(f'get_next_binded_repo(): failed to load repository "{repo_name}"')
print(f'git_logger.get_next_binded_repo(): error {err}')
print(f'git_logger.get_next_binded_repo(): failed to load repository "{repo_name}"')
Comment on lines +74 to +75
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше логгирование, а не простые принты

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это уже было в коде

else:
yield client, repo, token

Expand Down
4 changes: 3 additions & 1 deletion interface_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def create_api(token: str, base_url: str | None = None) -> IRepositoryAPI:
errors = []

try:
return GitHubRepoAPI(Github(auth=Auth.Token(token)))
client = GitHubRepoAPI(Github(auth=Auth.Token(token)))
if client.client:
return client
except Exception as e:
errors.append(f"GitHub login failed: {e}")

Expand Down
1 change: 1 addition & 0 deletions invites_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def log_invitations(
logger.log_to_csv(csv_name, list(info.keys()))

for client, repo, token in binded_repos:
print(client, repo, token)
logger.log_title(repo.name)
try:
log_repository_invitations(client, repo, csv_name)
Expand Down