You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/check-backport-labels.yml
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ jobs:
53
53
54
54
echo "::endgroup::"
55
55
56
-
has_backport_label=false
56
+
has_exact_backport_label=false
57
57
pr_majors=()
58
58
pr_floating_majors=()
59
59
@@ -62,13 +62,14 @@ jobs:
62
62
for pr_label in "${pr_labels[@]}"; do
63
63
for backport_label in "${all_backport_labels[@]}"; do
64
64
if [ "${pr_label}" = "${backport_label}" ]; then
65
-
has_backport_label=true
65
+
has_exact_backport_label=true
66
66
67
67
if [[ "${pr_label}" =~ ${backport_regex} ]]; then
68
68
major="${BASH_REMATCH[1]}"
69
69
minor="${BASH_REMATCH[2]}"
70
70
pr_majors+=("${major}")
71
71
if [ "${minor}" = "x" ]; then
72
+
has_exact_backport_label=false
72
73
pr_floating_majors+=("${major}")
73
74
fi
74
75
fi
@@ -80,8 +81,10 @@ jobs:
80
81
81
82
echo "::endgroup::"
82
83
83
-
if [ "${has_backport_label}" != true ]; then
84
-
echo "::error::No backport label found. Please add at least one of the 'backport {x}.{x}' labels or 'skip-backport', if this PR should not be backported."
84
+
if [ "${has_exact_backport_label}" != true ]; then
85
+
echo "::error::No exact backport label found. Please add at least one of the "\
86
+
"'backport {major}.{minor}' labels or use 'skip-backport', "\
0 commit comments