scripts: check cc stable mailing list in commit
Add a check for commits fixing a released bug. Such commits are found thanks to scripts/git-log-fixes.sh. They must be sent CC: stable@dpdk.org. In order to avoid forgetting CC, this mail header can be written in the git commit message. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
b5415fbc69
commit
814c8822ef
@ -47,12 +47,18 @@ if [ "$1" = '-h' -o "$1" = '--help' ] ; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
selfdir=$(dirname $(readlink -e $0))
|
||||||
range=${1:-origin/master..}
|
range=${1:-origin/master..}
|
||||||
|
# convert -N to HEAD~N.. in order to comply with git-log-fixes.sh getopts
|
||||||
|
if printf -- $range | grep -q '^-[0-9]\+' ; then
|
||||||
|
range="HEAD$(printf -- $range | sed 's,^-,~,').."
|
||||||
|
fi
|
||||||
|
|
||||||
commits=$(git log --format='%h' --reverse $range)
|
commits=$(git log --format='%h' --reverse $range)
|
||||||
headlines=$(git log --format='%s' --reverse $range)
|
headlines=$(git log --format='%s' --reverse $range)
|
||||||
bodylines=$(git log --format='%b' --reverse $range)
|
bodylines=$(git log --format='%b' --reverse $range)
|
||||||
fixes=$(git log --format='%h %s' --reverse $range | grep -i ': *fix' | cut -d' ' -f1)
|
fixes=$(git log --format='%h %s' --reverse $range | grep -i ': *fix' | cut -d' ' -f1)
|
||||||
|
stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
|
||||||
tags=$(git log --format='%b' --reverse $range | grep -i -e 'by *:' -e 'fix.*:')
|
tags=$(git log --format='%b' --reverse $range | grep -i -e 'by *:' -e 'fix.*:')
|
||||||
bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:'
|
bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:'
|
||||||
|
|
||||||
@ -191,3 +197,10 @@ bad=$(for fixtag in $fixtags ; do
|
|||||||
printf "$fixtag" | grep -v "^$good$"
|
printf "$fixtag" | grep -v "^$good$"
|
||||||
done | sed 's,^,\t,')
|
done | sed 's,^,\t,')
|
||||||
[ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n"
|
[ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n"
|
||||||
|
|
||||||
|
# check CC:stable for fixes
|
||||||
|
bad=$(for fix in $stablefixes ; do
|
||||||
|
git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
|
||||||
|
git log --format='\t%s' -1 $fix
|
||||||
|
done)
|
||||||
|
[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user