aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-07-20 10:29:30 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-07-20 10:30:09 +0300
commit8f6e696f039bbfc368925ee0bb70999a483d1ae2 (patch)
tree46a4a175cad37b1e38db860d33a68341c8a8f96a
parentpostrecv-bugs: fix closes invocation (diff)
downloadgithooks-8f6e696f039bbfc368925ee0bb70999a483d1ae2.tar.gz
githooks-8f6e696f039bbfc368925ee0bb70999a483d1ae2.tar.bz2
githooks-8f6e696f039bbfc368925ee0bb70999a483d1ae2.zip
postrecv-bugs: fix commit message and resolution when mentionedgithooks-20240720T073009Z
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rwxr-xr-xlocal/postrecv-bugs6
1 files changed, 4 insertions, 2 deletions
diff --git a/local/postrecv-bugs b/local/postrecv-bugs
index 76d1353..b5d9868 100755
--- a/local/postrecv-bugs
+++ b/local/postrecv-bugs
@@ -107,8 +107,10 @@ $(git show --pretty=fuller --date=iso-local --stat "${commithash}")"
# TODO: --show-signature with some nice short output
if [[ ${close} == 1 ]]; then
- CLOSE_BUGS[${bugno}]+=${newmsg}
- CLOSE_RESO[${bugno}]+=${resolution:-FIXED}
+ if [[ -z ${resolution} ]]; then # we catch the resolution on second pass over the same line
+ CLOSE_BUGS[${bugno}]+=${newmsg}
+ fi
+ CLOSE_RESO[${bugno}]=${resolution:-FIXED}
else
COMMENT_BUGS[${bugno}]+=${newmsg}
fi