From 8be5a1f0a5ac176ff7c1c83d9979627b6bc335b9 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Mon, 13 Apr 2020 15:54:09 +0300 Subject: [PATCH] simple backport script --- utils/simple-backport/backport.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/simple-backport/backport.sh b/utils/simple-backport/backport.sh index 06ec63d25ec..7fbd34f0a08 100755 --- a/utils/simple-backport/backport.sh +++ b/utils/simple-backport/backport.sh @@ -58,10 +58,10 @@ do # Next, check the tag. They might override the decision. Checks are ordered by priority. labels="$(jq -r .labels[].name "$file")" - if echo "$labels" | grep "pr-must-backport\|v$branch-must-backport" > /dev/null; then action="backport"; fi - if echo "$labels" | grep "v$branch-conflicts" > /dev/null; then action="conflict"; fi - if echo "$labels" | grep "pr-no-backport\|v$branch-no-backport" > /dev/null; then action="no-backport"; fi - if echo "$labels" | grep "v$branch\|v$branch-backported" > /dev/null; then action="done"; fi + if echo "$labels" | grep -x "pr-must-backport\|v$branch-must-backport" > /dev/null; then action="backport"; fi + if echo "$labels" | grep -x "v$branch-conflicts" > /dev/null; then action="conflict"; fi + if echo "$labels" | grep -x "pr-no-backport\|v$branch-no-backport" > /dev/null; then action="no-backport"; fi + if echo "$labels" | grep -x "v$branch\|v$branch-backported" > /dev/null; then action="done"; fi # Find merge commit SHA for convenience merge_sha="$(jq -r .merge_commit_sha "$file")"