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
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ echo "REF: $GITHUB_REF"
echo "HEAD-REF: $GITHUB_HEAD_REF"
echo "BASE-REF: $GITHUB_BASE_REF"
pwd
ls -la `pwd`
id

# Add safe directory option for github workspace to disable fatal error
Expand All @@ -37,8 +36,9 @@ fi
echo
echo -e "\e[0;34mGet the list of commits included in the PR($GITHUB_REF).\e[0m"
PR=${GITHUB_REF#"refs/pull/"}
PRNUM=${PR%"/merge"}
URL=https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${PRNUM}/commits
PRNUM=${PR%"/merge"} # GitHub
PRNUM=${PR%"/head"} # Forgejo
URL=${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PRNUM}/commits
echo " - API endpoint: $URL"

list=$(curl $URL "${HEADERS[@]}" -X GET -s | jq '.[].sha' -r)
Expand Down