Skip to content

Commit

Permalink
Merge pull request #97 from dwhswenson/update-pr-links
Browse files Browse the repository at this point in the history
Update release note PR links for changes in GitHub
  • Loading branch information
dwhswenson authored Jul 5, 2021
2 parents e61cf74 + da4fc24 commit c610c9a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions autorelease/release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ def write_pull_line(self, pull, extra_labels=None):
title = pull['title']
number = str(pull['number'])
author = pull['user']['login']
out_str = "* " + title + " (#" + number
url = pull['html_url']
pull_link = "([#" + number + "](" + url + ")"
if author not in self.config['standard_contributors']:
out_str += " @" + author
out_str += ")"
pull_link += " @" + author
pull_link += ")"
out_str = "* " + title + " " + pull_link
for label in extra_labels:
label = label.replace(' ', '_')
out_str += " #" + label
Expand All @@ -139,7 +141,7 @@ def output_for_known_labels(self, pull_dict, pull_to_labels):
out_str = ""
for lbl in self.config['labels']:
label = lbl['label']
out_str += "\n# " + lbl['heading'] + "\n"
out_str += "\n## " + lbl['heading'] + "\n"
for pull in pull_dict[label]:
pull_labels = set(pull_to_labels[pull['number']])
extra_labels = pull_labels - set([label])
Expand Down

0 comments on commit c610c9a

Please sign in to comment.