Skip to content

Commit

Permalink
Fix get_installed_owners_and_repos encountered an TypeError: get_inst…
Browse files Browse the repository at this point in the history
…alled_owners_and_repos() got an unexpected keyword argument 'installation_id'
  • Loading branch information
hiroshinishio committed Jul 4, 2024
1 parent d557164 commit bde8847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cloudformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Resources:
Properties:
Name: SchedulerEventRule
Description: "Schedule Lambda function to run every weekday at 0 AM UTC"
ScheduleExpression: cron(25 7 ? * MON-FRI *) # min hour day month day-of-week year
ScheduleExpression: cron(38 7 ? * MON-FRI *) # min hour day month day-of-week year
State: ENABLED
Targets:
- Arn: !Ref LambdaFunctionArn
Expand Down
7 changes: 3 additions & 4 deletions scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ def schedule_handler(_event, _context) -> dict[str, int]:
# Get the installation access token for each installation ID.
token = get_installation_access_token(installation_id=installation_id)
if token is None:
logging.info("Token is None for installation_id: %s, so skipping", installation_id)
msg = f"Token is None for installation_id: {installation_id}, so skipping"
logging.info(msg)
continue

# Get all owners and repositories for each installation ID.
owners_repos: list[dict[str, str]] = get_installed_owners_and_repos(
installation_id=installation_id, token=token
)
owners_repos: list[dict[str, str]] = get_installed_owners_and_repos(token=token)

# Process each owner and repository.
for owner_repo in owners_repos:
Expand Down

0 comments on commit bde8847

Please sign in to comment.