mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-10 19:42:58 +00:00
Improve commits counting: inly count merge commits, calc between midnights UTC
This commit is contained in:
@@ -34,10 +34,19 @@ def build_monthly_table_line(year_month_file: Path) -> str:
|
|||||||
year=int(year_month[:4]), month=int(year_month[5:]), day=1
|
year=int(year_month[:4]), month=int(year_month[5:]), day=1
|
||||||
)
|
)
|
||||||
next_month = current_month + relativedelta.relativedelta(months=1)
|
next_month = current_month + relativedelta.relativedelta(months=1)
|
||||||
future = (
|
with plumbum.local.env(TZ="UTC"):
|
||||||
git["log", "--oneline", "--since", current_month, "--until", next_month]
|
future = (
|
||||||
& plumbum.BG
|
git[
|
||||||
)
|
"log",
|
||||||
|
"--oneline",
|
||||||
|
"--since",
|
||||||
|
f"{current_month}.midnight",
|
||||||
|
"--until",
|
||||||
|
f"{next_month}.midnight",
|
||||||
|
"--first-parent",
|
||||||
|
]
|
||||||
|
& plumbum.BG
|
||||||
|
)
|
||||||
future.wait()
|
future.wait()
|
||||||
commits = len(future.stdout.splitlines())
|
commits = len(future.stdout.splitlines())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user