From 4bb5e453fdc07f057a7e891e4252898259e2e227 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 26 Jul 2017 16:00:27 +0530 Subject: [PATCH] fix the issues with github issues backporting to release branch --- compare-bug-version-and-git-branch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compare-bug-version-and-git-branch.sh b/compare-bug-version-and-git-branch.sh index 1de826f..44a9aa8 100755 --- a/compare-bug-version-and-git-branch.sh +++ b/compare-bug-version-and-git-branch.sh @@ -23,6 +23,9 @@ BUG=$(git show --name-only --format=email | awk '{IGNORECASE=1} /^BUG:/{print $2 if [ -z "${BUG}" -a "${GERRIT_TOPIC}" = "rfc" ]; then echo "No BUG id for rfc needed." exit 0 +elif [ -a "${GERRIT_TOPIC#*rfc*}" != "${GERRIT_TOPIC}" -a "${GERRIT_BRANCH}" != "master" ]; then + echo "No BUG id for rfc needed in 'non-master' branch" + exit 0 elif [ -z "${BUG}" ]; then echo "No BUG id, but topic '${GERRIT_TOPIC}' does not match 'rfc'." exit 1