diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-01-14 23:22:02 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-01-14 23:24:22 +0100 |
commit | dd70412911e22b4ced5b07e36439c8ef03d527c3 (patch) | |
tree | cd31170a6364e0a2020face3ea468fc6ea37625a /post-commit | |
parent | 66b7046990fda43b59767ccdb4cb401d702f4ce9 (diff) | |
download | todosrht2gitbug-dd70412911e22b4ced5b07e36439c8ef03d527c3.tar.gz |
Automatization of closing bug in git-bug via commit message.
Diffstat (limited to 'post-commit')
-rw-r--r-- | post-commit | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/post-commit b/post-commit new file mode 100644 index 0000000..b0587ba --- /dev/null +++ b/post-commit @@ -0,0 +1,8 @@ +#!/bin/sh +set -eux + +BUG_ID=$(git format-patch --stdout HEAD~|git interpret-trailers --parse|awk -F '#' '/^Fixes: gb#/ { print $2}') +if [ -n "$BUG_ID" ] ; then + git bug comment add "${BUG_ID}" -m "Closed by the commit $(git log -1 --abbrev=12 --format="format:%h" HEAD)." + git bug status close "$BUG_ID" +fi |