Skip to content

Commit

Permalink
Merge pull request #472 from gitautoai/wes
Browse files Browse the repository at this point in the history
Soften a frequent error: add_issue_templates encountered an BadCredentialsException: 401
  • Loading branch information
hiroshinishio authored Jan 8, 2025
2 parents c79b506 + 3544c12 commit 4eccb1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/webhook_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Standard imports
import re
from time import sleep
from typing import Any

# Local imports
Expand Down Expand Up @@ -53,6 +54,9 @@ async def handle_installation_created(payload: GitHubInstallationPayload) -> Non
email=user_email,
)

# Wait for 120 seconds
sleep(120)

# Add issue templates to the repositories
for i, full_name in enumerate(iterable=repo_full_names, start=1):
print(f"\nAdding issue templates ({i}/{len(repo_full_names)}): {full_name}")
Expand Down

0 comments on commit 4eccb1c

Please sign in to comment.