Skip to content

Commit

Permalink
diff branch only
Browse files Browse the repository at this point in the history
  • Loading branch information
aglipanci authored Feb 2, 2025
1 parent 5b87bfb commit 52c58b3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ if [[ "${INPUT_PRESET}" ]]; then
pint_command+=" --preset ${INPUT_PRESET}"
fi

if [[ "${INPUT_ONLYDIFF}" == true ]]; then
if [[ -n "${GITHUB_TOKEN}" ]]; then
INPUT_ONLYDIFF=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}" | jq -r .default_branch)
else
INPUT_ONLYDIFF=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
fi
fi

if [[ "${INPUT_ONLYDIFF}" ]]; then
pint_command+=" --diff=${INPUT_ONLYDIFF}"
INPUT_ONLYDIRTY=false
fi

if [[ "${INPUT_ONLYDIRTY}" == true ]]; then
Expand Down

0 comments on commit 52c58b3

Please sign in to comment.