Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 authored Nov 8, 2023
1 parent 7d14be8 commit 94ffa3e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ echo "comitted png files"

# add review comment
if [[ "${INPUT_ENABLEREVIEWCOMMENT}" != "true" ]]; then
git push origin HEAD:${GITHUB_HEAD_REF}
git push
exit 0
fi
echo "1"
git fetch
echo "2"
GITHUB_SHA_AFTER=$(git rev-parse origin/${GITHUB_HEAD_REF})
echo "3"
GITHUB_SHA_AFTER=$(git rev-parse HEAD)
DIFF_FILES=`git diff ${GITHUB_SHA} ${GITHUB_SHA_AFTER} --name-only | grep ".png"`
echo $DIFF_FILES
BODY="## Diagrams changed\n"
Expand All @@ -73,7 +70,6 @@ EOS
`
BODY=${BODY}${TEMP}
done
echo "4"
BODY=`echo ${BODY} | sed -e "s/\:/\\\:/g"`
PULL_NUM=`echo ${GITHUB_REF} | sed -r "s/refs\/pull\/([0-9]+)\/merge/\1/"`
echo "body: ${BODY}"
Expand All @@ -85,5 +81,4 @@ curl -X POST \
-d "{\"event\": \"COMMENT\", \"body\": \"${BODY}\"}" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PULL_NUM}/reviews"
echo "added review comments"
echo "5"
git push origin HEAD:${GITHUB_HEAD_REF}
git push

0 comments on commit 94ffa3e

Please sign in to comment.