Skip to content

Commit 1dbdca2

Browse files
committed
fix: better error messages
1 parent 5eea03a commit 1dbdca2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

entrypoint.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PROJECT_URL="$INPUT_PROJECT"
44
if [ -z "$PROJECT_URL" ]; then
5-
echo "PROJECT_URL is not defined." >&2
5+
echo "Project input variable is not defined." >&2
66
exit 1
77
fi
88

@@ -20,7 +20,7 @@ get_project_type() {
2020
echo "repo"
2121
;;
2222
*)
23-
echo "Invalid PROJECT_URL: $_PROJECT_URL" >&2
23+
echo "Invalid Project URL: '$_PROJECT_URL' . Please pass a valid Project URL in the project input variable" >&2
2424
exit 1
2525
;;
2626
esac
@@ -110,7 +110,7 @@ if [ -z "$INITIAL_COLUMN_NAME" ]; then
110110
# assing the column name by default
111111
INITIAL_COLUMN_NAME='To do'
112112
if [ "$GITHUB_EVENT_NAME" == "pull_request" ] || [ "$GITHUB_EVENT_NAME" == "pull_request_target" ]; then
113-
echo "changing col name for PR event"
113+
echo "changing column name for PR event"
114114
INITIAL_COLUMN_NAME='In progress'
115115
fi
116116
fi
@@ -120,7 +120,7 @@ PROJECT_ID=$(find_project_id "$PROJECT_TYPE" "$PROJECT_URL")
120120
INITIAL_COLUMN_ID=$(find_column_id "$PROJECT_ID" "${INITIAL_COLUMN_NAME:?<Error> required this environment variable}")
121121

122122
if [ -z "$INITIAL_COLUMN_ID" ]; then
123-
echo "INITIAL_COLUMN_ID is not found." >&2
123+
echo "Column name '$INITIAL_COLUMN_ID' is not found." >&2
124124
exit 1
125125
fi
126126

@@ -144,7 +144,7 @@ case "$GITHUB_EVENT_NAME" in
144144
"https://api.github.com/projects/columns/$INITIAL_COLUMN_ID/cards"
145145
;;
146146
*)
147-
echo "Nothing to be done on this action: $GITHUB_EVENT_NAME" >&2
147+
echo "Nothing to be done on this action: '$GITHUB_EVENT_NAME'" >&2
148148
exit 1
149149
;;
150150
esac

0 commit comments

Comments
 (0)