Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,22 @@ if [[ -z "${PR_NUMBER}" ]]; then
else
TITLE=$(git log -1 --pretty=%s | head -1)
fi

if [[ -n "${INPUT_LABEL}" ]]; then
echo "Ensuring labels exist..."

IFS=',' read -ra LABELS <<< "${INPUT_LABEL}"

for label in "${LABELS[@]}"; do
label="$(trim_whitespace "${label}")"

echo "Creating label if missing: ${label}"

gh label create "${label}" \
--repo "${TARGET_REPOSITORY}" \
--force || true
done
fi
else
echo -e "${TEMPLATE}" > /tmp/template
fi
Expand Down Expand Up @@ -659,4 +675,4 @@ else
echo -e "\n[INFO] No errors found."
echo -e "\n[INFO] See the pull request: ${URL}"
exit 0
fi
fi