From 6a212b5524903c170d420763c9c08a5444745281 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 19 Oct 2021 17:34:17 -0400 Subject: Initial implementation of native mail sending I'm felling comfortable that "b4 ty" is sufficiently mature at this point to implement sending thank-yous directly. This is only the initial implementation that covers only the very basic parts of git's sendemail configuration options, but this should actually cover 90% of cases if not more. One important caveat -- I moved the "b4 ty -s" flag to be "b4 ty -t" in order to disambiguate it from the capital -S (that actually does the sending). Since "b4 ty" is still marked as an experimental feature, I feel we can do this without much impact. Signed-off-by: Konstantin Ryabitsev --- b4/command.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'b4/command.py') diff --git a/b4/command.py b/b4/command.py index 199d0c2..9d364dd 100644 --- a/b4/command.py +++ b/b4/command.py @@ -199,7 +199,7 @@ def cmd(): 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', default=None, + sp_ty.add_argument('-t', '--thank-for', default=None, help='Generate thankyous for specific entries from -l (e.g.: 1,3-5,7-; or "all")') sp_ty.add_argument('-d', '--discard', default=None, help='Discard specific messages from -l (e.g.: 1,3-5,7-; or "all")') @@ -209,6 +209,10 @@ def cmd(): help='The branch to check against, instead of current') sp_ty.add_argument('--since', default='1.week', help='The --since option to use when auto-matching patches (default=1.week)') + sp_ty.add_argument('-S', '--send-email', action='store_true', dest='sendemail', default=False, + help='Send email instead of writing out .thanks files') + sp_ty.add_argument('--dry-run', action='store_true', dest='dryrun', default=False, + help='Print out emails instead of sending them') sp_ty.set_defaults(func=cmd_ty) # b4 diff -- cgit v1.2.3