Skip to content

Commit 3b1efca

Browse files
authored
Fix latest commit time (#89)
* Checkout in the original place instead * Remove not used checkout * Comment improvement
1 parent bafc350 commit 3b1efca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

completion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def get_completion(
6969
hide_reserved=False,
7070
api_url='',
7171
).completion
72+
clone_repo.git.checkout(branch) # restore the original state
7273
else:
7374
month_ago_completion = 0.0
7475

generate_metadata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def get_metadata(
3636
) -> tuple[int, int, datetime | None]:
3737
if not repo or not (repo_path := Path(clones_dir, 'translations', repo)).exists():
3838
return 0, 0, None
39-
(clone_repo := Repo(repo_path)).git.checkout()
40-
latest_commit = clone_repo.head.commit.committed_datetime
39+
latest_commit = Repo(repo_path).head.commit.committed_datetime
4140
if not completion:
4241
return 0, 0, latest_commit
4342
return (

0 commit comments

Comments
 (0)