Follow up for cherry-pick check for merge patch

This is a follow up to change
I8e4e5afc773d53dee9c1c24951bb07a45ddc2f1a which fixed an issue with
validation when the topmost patch after a Zuul rebase is a merge
patch.

We need to also use the $commit_hash variable for the check for
stable-only patches, else it will incorrectly fail because it is
checking the merge patch's commit message.

Change-Id: Ia725346b65dd5e2f16aa049c74b45d99e22b3524
(cherry picked from commit 1e10461c71)
(cherry picked from commit f1e4f6b078)
(cherry picked from commit e676a48054)
(cherry picked from commit 115b43ed3e)
(cherry picked from commit cde42879a4)
This commit is contained in:
melanie witt 2020-10-08 05:45:24 +00:00
parent 211b5d1ca5
commit 3c77443550
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ if [ $checked -eq 0 ]; then
echo "Checked $checked cherry-pick hashes: OK" echo "Checked $checked cherry-pick hashes: OK"
exit 0 exit 0
else else
if ! git show --format='%B' --quiet | grep -qi 'stable.*only'; then if ! git show --format='%B' --quiet $commit_hash | grep -qi 'stable.*only'; then
echo 'Stable branch requires either cherry-pick -x headers or [stable-only] tag!' echo 'Stable branch requires either cherry-pick -x headers or [stable-only] tag!'
exit 1 exit 1
fi fi