git-mr-comment-list: allow limit comments by author
authorFrantisek Hrbata <frantisek@hrbata.com>
Sat, 19 Dec 2020 12:10:51 +0000 (13:10 +0100)
committerFrantisek Hrbata <frantisek@hrbata.com>
Sat, 19 Dec 2020 12:10:51 +0000 (13:10 +0100)
Signed-off-by: Frantisek Hrbata <frantisek@hrbata.com>
git-mr-comment-list

index b672d156e85794533f11fa70d01435f3c49ed94a..a6f7fff78998bdd270ebc2e29f1327a61578346c 100755 (executable)
@@ -43,6 +43,8 @@ parser.add_argument("--after", metavar="DATE",
         help="Limit the comments output to ones more recent than a specific date.")
 parser.add_argument("--before", metavar="DATE",
         help="Limit the comments output to ones older than a specific date.")
+parser.add_argument("--author", metavar="PATTERN", action="append",
+        help="Limit the comments output to ones that were created by user matching PATTERN. Can be used multiple times.")
 
 class CFormatter(string.Formatter):
     def __init__(self):
@@ -111,6 +113,10 @@ if args.after:
 if args.before:
     cmd += ["--before", args.before]
 
+if args.author:
+    for pattern in args.author:
+        cmd += ["--author", pattern]
+
 rv, out, err = mrlib.run(cmd, stdin=stdin)
 
 c2m = mrlib.comments2mrs(refs, mrs)