forked from lda/telodendria
Allow me to add arbitrary messages to the accept and reject functions.
This commit is contained in:
parent
af03988db7
commit
fb4458ef63
1 changed files with 7 additions and 1 deletions
|
@ -103,7 +103,13 @@ case "$1" in
|
||||||
"accept"|"reject")
|
"accept"|"reject")
|
||||||
if [ -f "$TP_DIR/queued/$2.patch" ]; then
|
if [ -f "$TP_DIR/queued/$2.patch" ]; then
|
||||||
mv "$TP_DIR/queued/$2.patch" "$TP_DIR/${1}ed/$2.patch"
|
mv "$TP_DIR/queued/$2.patch" "$TP_DIR/${1}ed/$2.patch"
|
||||||
matrix_send "Patch <a href=\"https://telodendria.io/patches/p/$2.patch\">#$2</a> was marked as ${1}ed."
|
msg="Patch <a href=\"https://telodendria.io/patches/p/$2.patch\">#$2</a> was marked as ${1}ed."
|
||||||
|
msgFile="/tmp/patchmsg-$(date +%s).txt"
|
||||||
|
$EDITOR "$msgFile"
|
||||||
|
if [ -f "$msgFile" ]; then
|
||||||
|
msg="$msg<br><blockquote>$(cat $msgFile)</blockquote>"
|
||||||
|
fi
|
||||||
|
matrix_send "$msg"
|
||||||
else
|
else
|
||||||
echo "Patch #$2 doesn't exist in the queue."
|
echo "Patch #$2 doesn't exist in the queue."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue