From fb4458ef63c15e4bf58c6457e87a223ca636fd4d Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Fri, 12 Aug 2022 19:08:27 -0400 Subject: [PATCH] Allow me to add arbitrary messages to the accept and reject functions. --- tools/bin/tp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/bin/tp b/tools/bin/tp index 8b72d9d..c553346 100755 --- a/tools/bin/tp +++ b/tools/bin/tp @@ -103,7 +103,13 @@ case "$1" in "accept"|"reject") if [ -f "$TP_DIR/queued/$2.patch" ]; then mv "$TP_DIR/queued/$2.patch" "$TP_DIR/${1}ed/$2.patch" - matrix_send "Patch #$2 was marked as ${1}ed." + msg="Patch #$2 was marked as ${1}ed." + msgFile="/tmp/patchmsg-$(date +%s).txt" + $EDITOR "$msgFile" + if [ -f "$msgFile" ]; then + msg="$msg
$(cat $msgFile)
" + fi + matrix_send "$msg" else echo "Patch #$2 doesn't exist in the queue." exit 1