Skip to content

Commit a3f4156

Browse files
authored
Merge pull request #1531 from snyk/chore/fix-issue-tagging-script
chore: fix issue tagging script
2 parents a50b393 + 0197053 commit a3f4156

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/issue-tagging.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ for pr in $PRs; do
5050
ISSUES+=("$id")
5151
done
5252

53-
# Remove duplicate IDs
54-
# This can happen when we release using a separate branch (e.g. patch releases)
55-
mapfile -t ISSUES < <(printf "%s\n" "${ISSUES[@]}" | sort -u)
53+
if (( ${#ISSUES[@]} > 0 )); then
54+
# Remove duplicate IDs
55+
# This can happen when we release using a separate branch (e.g. patch releases)
56+
mapfile -t ISSUES < <(printf "%s\n" "${ISSUES[@]}" | sort -u)
57+
fi
5658

5759
echo "Creating milestone $LATEST_TAG in github.com/$REPO"
5860
curl -X POST \

0 commit comments

Comments
 (0)