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 4848
4949 echo "::endgroup::"
5050
51+ has_skip_backport_label=false
5152 has_exact_backport_label=false
5253 declare -A pr_exact_majors=()
5354 declare -A pr_floating_majors=()
5657
5758 for pr_label in "${pr_labels[@]}"; do
5859 if [ "${pr_label}" = "skip-backport" ]; then
59- has_exact_backport_label =true
60+ has_skip_backport_label =true
6061 echo "${pr_label}"
6162 continue
6263 fi
8182
8283 echo "::endgroup::"
8384
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
8592 echo "::error::No exact backport label found. Please add at least one of the"\
8693 "'backport {major}.{minor}' labels or use 'skip-backport',"\
8794 "if this PR should not be backported."
You can’t perform that action at this time.
0 commit comments