File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 48
48
49
49
echo "::endgroup::"
50
50
51
+ has_skip_backport_label=false
51
52
has_exact_backport_label=false
52
53
declare -A pr_exact_majors=()
53
54
declare -A pr_floating_majors=()
56
57
57
58
for pr_label in "${pr_labels[@]}"; do
58
59
if [ "${pr_label}" = "skip-backport" ]; then
59
- has_exact_backport_label =true
60
+ has_skip_backport_label =true
60
61
echo "${pr_label}"
61
62
continue
62
63
fi
81
82
82
83
echo "::endgroup::"
83
84
84
- if [ "${has_exact_backport_label}" != true ]; then
85
+ if [ "${has_skip_backport_label}" = true ] && [ "${has_exact_backport_label}" = true ]; then
86
+ echo "::error::The 'skip-backport' not be used in combination with another backport"\
87
+ "label."
88
+ exit 1
89
+ fi
90
+
91
+ if [ "${has_skip_backport_label}" != true ] && [ "${has_exact_backport_label}" != true ]; then
85
92
echo "::error::No exact backport label found. Please add at least one of the"\
86
93
"'backport {major}.{minor}' labels or use 'skip-backport',"\
87
94
"if this PR should not be backported."
You can’t perform that action at this time.
0 commit comments