aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/weekly-changelog-report.py
blob: 101de2919ba5c1ee6925b644d86cbbbdf0a86275 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python


# generates an OE changelog for last weeks activity (Mon-Sun) assuming it is run on
# any day of the following week

# TODO
# - remove patch count as it does not match after we remove "Merge branch" statements
# - add bugzilla info

import datetime
import os

today = datetime.date.today()

# 0 = Mon, 6 = Sun
today_weekday = today.weekday()

# find Mon of this week
end_day = today - datetime.timedelta(today_weekday)

start_day = end_day - datetime.timedelta(7)

print "OE weekly changelog %s to %s\n" % (start_day.isoformat(), end_day.isoformat())

os.system("git-shortlog --since=%s --until=%s | grep -v \"Merge branch\" | grep -v \"Merge commit\"" % (start_day.isoformat(), end_day.isoformat()))