From 7210e188cc087f2f9a2aba23420d781d6d1a8691 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Thu, 9 Apr 2020 18:21:42 -0400 Subject: Add b4 ty that aims to simplify common feedback New experimental feature that aims to simplify a very common "thanks, applied" kind of feedback often expected of maintainers. Still needs documentation to explain its usage. Signed-off-by: Konstantin Ryabitsev --- b4/command.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'b4/command.py') diff --git a/b4/command.py b/b4/command.py index d465732..d195509 100644 --- a/b4/command.py +++ b/b4/command.py @@ -55,6 +55,11 @@ def cmd_pr(cmdargs): b4.pr.main(cmdargs) +def cmd_ty(cmdargs): + import b4.ty + b4.ty.main(cmdargs) + + def cmd(): parser = argparse.ArgumentParser( description='A tool to work with public-inbox patches', @@ -133,6 +138,26 @@ def cmd(): help='Message ID to process, or pipe a raw message') sp_pr.set_defaults(func=cmd_pr) + # b4 ty + sp_ty = subparsers.add_parser('ty', help='Generate thanks email when something gets merged/applied') + sp_ty.add_argument('-g', '--gitdir', default=None, + help='Operate on this git tree instead of current dir') + sp_ty.add_argument('-o', '--outdir', default='.', + help='Write thanks files into this dir (default=.)') + sp_ty.add_argument('-l', '--list', action='store_true', default=False, + help='List pull requests and patch series you have retrieved') + sp_ty.add_argument('-s', '--send', nargs='+', + help='Generate thankyous for specified messages (use -l to get the list or "all")') + sp_ty.add_argument('-d', '--discard', nargs='+', + help='Discard specified messages (use -l to get the list, or use "_all")') + sp_ty.add_argument('-a', '--auto', action='store_true', default=False, + help='Use the Auto-Thankanator to figure out what got applied/merged') + sp_ty.add_argument('-b', '--branch', default=None, + help='The branch to check against, instead of current (use with -a)') + sp_ty.add_argument('--since', default='1.week', + help='The --since option to use when auto-matching patches (default=1.week)') + sp_ty.set_defaults(func=cmd_ty) + cmdargs = parser.parse_args() logger.setLevel(logging.DEBUG) -- cgit v1.2.3