Skip to content

Commit a61c9ae

Browse files
committed
Improve commits counting: inly count merge commits, calc between midnights UTC
1 parent 9cee159 commit a61c9ae

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tagging/update_wiki.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,19 @@ def build_monthly_table_line(year_month_file: Path) -> str:
3434
year=int(year_month[:4]), month=int(year_month[5:]), day=1
3535
)
3636
next_month = current_month + relativedelta.relativedelta(months=1)
37-
future = (
38-
git["log", "--oneline", "--since", current_month, "--until", next_month]
39-
& plumbum.BG
40-
)
37+
with plumbum.local.env(TZ="UTC"):
38+
future = (
39+
git[
40+
"log",
41+
"--oneline",
42+
"--since",
43+
f"{current_month}.midnight",
44+
"--until",
45+
f"{next_month}.midnight",
46+
"--first-parent",
47+
]
48+
& plumbum.BG
49+
)
4150
future.wait()
4251
commits = len(future.stdout.splitlines())
4352

0 commit comments

Comments
 (0)