diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-09 18:21:42 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-09 18:21:42 -0400 |
commit | 7210e188cc087f2f9a2aba23420d781d6d1a8691 (patch) | |
tree | 5eb825c8eec316e4c4859f61b559dbf438d76eef /b4/command.py | |
parent | 18a3026a98c2e7c57c0c3e3988520b82da92aff5 (diff) | |
download | b4-7210e188cc087f2f9a2aba23420d781d6d1a8691.tar.gz |
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 <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 25 |
1 files changed, 25 insertions, 0 deletions
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) |