Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (5)
Add missing calendar import.
· 3d02dfb2
Chris Lamb
authored
May 01, 2019
3d02dfb2
Use datetime objects so we get a .timestamp() method.
· 69b65744
Chris Lamb
authored
May 01, 2019
69b65744
Replace tabs with spaces.
· b56a2de8
Chris Lamb
authored
May 01, 2019
b56a2de8
Correct calculation of "last" month.
· 4b46bbb7
Chris Lamb
authored
May 01, 2019
4b46bbb7
2019-05 +=
salsa-ci-team/pipeline!74
· 95a45b61
Chris Lamb
authored
May 01, 2019
95a45b61
Show whitespace changes
Inline
Side-by-side
_reports/2019-04.md
View file @
95a45b61
_reports/2019-05.md
0 → 100644
View file @
95a45b61
---
layout
:
new/report
year
:
"
2019"
month
:
"
05"
month_name
:
"
May"
draft
:
true
title
:
"
Reproducible
builds
in
May
2019"
---
*
[
FIXME
](
https://salsa.debian.org/salsa-ci-team/pipeline/merge_requests/74
)
bin/generate-draft
View file @
95a45b61
#!/usr/bin/env python3
import
calendar
import
collections
import
datetime
import
jinja2
...
...
@@ -27,9 +28,10 @@ def main(*args):
for
x
in
PROJECTS
+
(
'
reproducible-notes
'
,):
ensure_dir
(
sibling_repo_gitdir
(
x
))
today
=
datetime
.
datetime
.
utcnow
()
previous_month
=
datetime
.
date
.
today
().
replace
(
day
=
1
)
-
\
datetime
.
timedelta
(
days
=
1
)
data
=
get_data
(
today
.
year
,
today
.
month
)
data
=
get_data
(
previous_month
.
year
,
previous_month
.
month
)
env
=
jinja2
.
Environment
(
loader
=
jinja2
.
FileSystemLoader
(
os
.
path
.
dirname
(
__file__
))
...
...
@@ -75,8 +77,12 @@ def get_data(year, month, max_age=3600):
log
(
"
Getting new data
"
)
month_start
=
datetime
.
date
(
year
=
year
,
month
=
month
,
day
=
1
)
month_end
=
month_start
.
replace
(
day
=
calendar
.
monthlen
(
year
,
month
))
month_start
=
datetime
.
datetime
(
year
=
year
,
month
=
month
,
day
=
1
)
month_end
=
month_start
.
replace
(
day
=
calendar
.
monthlen
(
year
,
month
),
hour
=
23
,
minute
=
59
)
month_start_ts
=
int
(
month_start
.
timestamp
())
month_end_ts
=
int
(
month_end
.
timestamp
())
...
...