blob: bbfc35f6bddbf7764ec5d994f15061bd3fe4c818 [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Script to generate ChromeDriver release notes.
# Before running this script, download list of fixed issues from
# to ~/Download/chromedriver-issues.csv. Output is ./notes.txt.
import csv
import datetime
import os
import sys
if len(sys.argv) != 2:
print 'usage: python %s version' % sys.argv[0]
version = sys.argv[1]
major_version = version.split('.')[0]
notes_name = 'notes.txt'
csv_file = os.path.join(os.getenv('HOME'), 'Downloads',
f = open(csv_file, 'r')
lines ='\n')
fixed_issues = []
seen_header = False
for issue in csv.reader(lines):
if not issue:
if not seen_header:
if issue[0] == 'ID':
for i,title in enumerate(issue):
if title == 'Pri':
pri_col = i
elif title == 'Summary':
summary_col = i
if pri_col is None or summary_col is None:
print 'Missing Pri or Summary in headers'
seen_header = True
issue_id = issue[0]
desc = issue[summary_col]
pri = issue[pri_col]
fixed_issues.append('Resolved issue %s: %s [Pri-%s]' % (issue_id, desc, pri))
new_notes = '---------ChromeDriver %s (%s)---------\n%s\n%s\n' % (
'Supports Chrome version %s' % major_version,
with open(notes_name, 'w') as f: