diff mbox series

mklog: support '-b c/101343' format.

Message ID e7ad4928-e3fe-c8e1-c7b8-83dc3f3516dc@suse.cz
State New
Headers show
Series mklog: support '-b c/101343' format. | expand

Commit Message

Martin Liška July 12, 2021, 10:09 a.m. UTC
Hello.

I don't use --fill-up-bug-titles, but I would like using ./contrib/mklog.py  -b c/101343
producing:

	PR c/101343

...

I'm going to install the patch if there are not comments.

Martin

contrib/ChangeLog:

	* mklog.py: Support additional PRs without PR prefix.
---
  contrib/mklog.py | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/contrib/mklog.py b/contrib/mklog.py
index ba70af0eef2..d2aea85c7cc 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -157,7 +157,11 @@  def generate_changelog(data, no_functions=False, fill_pr_titles=False,
      global firstpr
  
      if additional_prs:
-        prs = [pr for pr in additional_prs if pr not in prs]
+        for apr in additional_prs:
+            if not apr.startswith('PR ') and '/' in apr:
+                apr = 'PR ' + apr
+            if apr not in prs:
+                prs.append(apr)
      for file in diff:
          # skip files that can't be parsed
          if file.path == '/dev/null':