pr-size-labeler/entrypoint.sh
2023-01-31 15:31:23 +01:00

23 lines
453 B
Bash
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
PR_SIZE_LABELER_HOME="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
if [ "$PR_SIZE_LABELER_HOME" == "/" ]; then
PR_SIZE_LABELER_HOME=""
fi
export PR_SIZE_LABELER_HOME
bash --version
source "$PR_SIZE_LABELER_HOME/src/main.sh"
for a in "${@}"; do
arg=$(echo "$a" | tr '\n' ' ' | xargs echo | sed "s/'//g"| sed "s///g")
sanitizedArgs+=("$arg")
done
main "${sanitizedArgs[@]}"
exit $?