From 92b615924a800f824c78f4a2fdd0bc447c6a56ab Mon Sep 17 00:00:00 2001 From: Stephen Mathieson Date: Fri, 28 Jan 2022 13:13:39 -0500 Subject: [PATCH] Do not add comment when deleting a preview Fixes #13 --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 118b45d5..2bad2e45 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -74,7 +74,7 @@ EOF if [ -z "$GITHUB_TOKEN" ] ; then echo "Skipping comment as GITHUB_TOKEN not provided" -else +elif [ "$AMPLIFY_COMMAND" != "delete" ]; then SUBDOMAIN_NAME=$(echo $BRANCH_NAME | sed 's/[^a-zA-Z0-9-]/-/') curl -X POST $COMMENT_URL -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" --data '{ "body": "'"Preview branch generated at https://$SUBDOMAIN_NAME.${AmplifyAppId}.amplifyapp.com"'" }' fi