-
Notifications
You must be signed in to change notification settings - Fork 18
/
scale_n_perf_defects.py
55 lines (48 loc) · 1.66 KB
/
scale_n_perf_defects.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python
from helpers import *
import datetime
now = datetime.datetime.now()
g = gapi.GoogleSpreadSheetAPI(SPREADSHEET_NAME, "Performance & scale blockers")
perf_blockers = sort_by_pm_score(get_performance_blockers())
for idx, bug in enumerate(perf_blockers):
row = 23 + idx
column = 2
g.update_sheet(
row,
column,
(
f'=HYPERLINK("https://bugzilla.redhat.com/show_bug'
f'.cgi?id={bug.bug_id}", "{bug.bug_id}")'
)
)
g.update_sheet(row, column+1, bug.summary)
g.update_sheet(row, column+6, bug.status)
g.update_sheet(row, column+7, bug.component)
g.update_sheet(row, column+8, bug.severity)
converted = datetime.datetime.strptime(
bug.creation_time.value, "%Y%m%dT%H:%M:%S"
)
g.update_sheet(row, column + 9, (now - converted).days)
g.clean_rows(2, 23 + len(perf_blockers), 36)
scale_blockers = sort_by_pm_score(get_scale_blockers())
for idx, bug in enumerate(scale_blockers):
row = 6 + idx
column = 2
g.update_sheet(
row,
column,
(
f'=HYPERLINK("https://bugzilla.redhat.com/show_bug'
f'.cgi?id={bug.bug_id}", "{bug.bug_id}")'
)
)
g.update_sheet(row, column+1, bug.summary)
g.update_sheet(row, column+6, bug.status)
g.update_sheet(row, column+7, bug.component)
g.update_sheet(row, column+8, bug.severity)
converted = datetime.datetime.strptime(
bug.creation_time.value, "%Y%m%dT%H:%M:%S"
)
g.update_sheet(row, column + 9, (now - converted).days)
g.clean_rows(2, 6 + len(scale_blockers), 19)
g.update_sheet(1, 1, f'Last update: {now.strftime("%Y-%m-%d %H:%M")}')