We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7186f0 commit 5b87bfbCopy full SHA for 5b87bfb
entrypoint.sh
@@ -31,6 +31,15 @@ if [[ "${INPUT_PRESET}" ]]; then
31
pint_command+=" --preset ${INPUT_PRESET}"
32
fi
33
34
+if [[ "${INPUT_ONLYDIFF}" == true ]]; then
35
+ if [[ -n "${GITHUB_TOKEN}" ]]; then
36
+ INPUT_ONLYDIFF=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
37
+ "https://api.github.com/repos/${GITHUB_REPOSITORY}" | jq -r .default_branch)
38
+ else
39
+ INPUT_ONLYDIFF=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
40
+ fi
41
+fi
42
+
43
if [[ "${INPUT_ONLYDIFF}" ]]; then
44
pint_command+=" --diff=${INPUT_ONLYDIFF}"
45
INPUT_ONLYDIRTY=false
0 commit comments