aboutsummaryrefslogtreecommitdiffstats
path: root/post-commit
blob: b0587bae948cf91254f810ec30656c489701df85 (plain) (blame)
1
2
3
4
5
6
7
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