Skip to content

Commit

Permalink
Merge pull request #172 from slaclab/labels
Browse files Browse the repository at this point in the history
Add Pull Request Labels Release Notes
  • Loading branch information
ruck314 authored Mar 17, 2020
2 parents a2f3e2f + 2c58960 commit bf0249d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion releaseNotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ def getReleaseNotes(locRepo, remRepo, tagRange, noSort=False):
else:
entry['Jira'] = None

entry['Labels'] = None
for lbl in req.get_labels():
if entry['Labels'] is None:
entry['Labels'] = lbl.name
else:
entry['Labels'] += ', ' + lbl.name

if 'release candidate' not in req.title.lower():
records.append(entry)

Expand All @@ -94,7 +101,7 @@ def getReleaseNotes(locRepo, remRepo, tagRange, noSort=False):

md += '\n|||\n|---:|:---|\n'

for i in ['Author','Date','Pull','Branch','Jira']:
for i in ['Author','Date','Pull','Branch','Jira','Labels']:
if i in entry and entry[i] is not None:
md += f'|**{i}:**|{entry[i]}|\n'

Expand Down

0 comments on commit bf0249d

Please sign in to comment.