From da4fc243a142f795bfa0761bf15e931aff7d3cfd Mon Sep 17 00:00:00 2001 From: "David W.H. Swenson" Date: Mon, 5 Jul 2021 14:51:27 -0400 Subject: [PATCH] Update PR links for changes in GitHub --- autorelease/release_notes.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autorelease/release_notes.py b/autorelease/release_notes.py index 8154ed2..2726432 100644 --- a/autorelease/release_notes.py +++ b/autorelease/release_notes.py @@ -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 @@ -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])