Skip to content

Commit

Permalink
add old code
Browse files Browse the repository at this point in the history
  • Loading branch information
kowyo authored Oct 24, 2024
1 parent b162047 commit 13b65c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gen_repo_update_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ def get_latest_commit(owner, repo):
commits = response.json()

for commit in commits:
message = commit['commit']['message']
message = commit[0]['commit']['message']
# Skip commits with messages starting with "Replace"
if message.startswith("Replace"):
continue

# If the commit does not start with "Replace", process it
commit_info['author'] = commit['commit']['author']['name']
commit_info['date'] = datetime.datetime.strptime(commit['commit']['author']['date'],
commit_info['author'] = commit[0]['commit']['author']['name']
commit_info['date'] = datetime.datetime.strptime(commit[0]['commit']['author']['date'],
"%Y-%m-%dT%H:%M:%SZ") + datetime.timedelta(hours=8) # UTC-8
commit_info['message'] = message
return commit_info # Return the first valid commit
Expand Down

0 comments on commit 13b65c5

Please sign in to comment.