aboutsummaryrefslogblamecommitdiffstats
path: root/post-commit
blob: c84075ea0d493851f063e634a6475eddf2435b07 (plain) (tree)
1
2
3
4
5
6
7
8
         
       





                                                                                                                  
#!/bin/sh
set -eu

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