Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 62952c1

Browse files
committed
reformat
1 parent 45cda3a commit 62952c1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

entrypoint.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,37 @@ echo "Checking if issue is a pull request..."
1515
(jq -r ".issue.pull_request.url" "$GITHUB_EVENT_PATH") || exit $NEUTRAL_EXIT_CODE
1616

1717
if [[ "$(jq -r ".action" "$GITHUB_EVENT_PATH")" != "created" ]]; then
18-
echo "This is not a new comment event!"
19-
exit $NEUTRAL_EXIT_CODE
18+
echo "This is not a new comment event!"
19+
exit $NEUTRAL_EXIT_CODE
2020
fi
2121

2222
PR_NUMBER=$(jq -r ".issue.number" "$GITHUB_EVENT_PATH")
2323
echo "Collecting information about PR #$PR_NUMBER of $GITHUB_REPOSITORY..."
2424

2525
if [[ -z "$GITHUB_TOKEN" ]]; then
26-
echo "Set the GITHUB_TOKEN env variable."
27-
exit 1
26+
echo "Set the GITHUB_TOKEN env variable."
27+
exit 1
2828
fi
2929

3030
URI=https://api.github.com
3131
API_HEADER="Accept: application/vnd.github.v3+json"
3232
AUTH_HEADER="Authorization: token $GITHUB_TOKEN"
3333

3434
pr_resp=$(curl -X GET -s -H "${AUTH_HEADER}" -H "${API_HEADER}" \
35-
"${URI}/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
35+
"${URI}/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
3636

3737
BASE_REPO=$(echo "$pr_resp" | jq -r .base.repo.full_name)
3838
BASE_BRANCH=$(echo "$pr_resp" | jq -r .base.ref)
3939

4040
if [[ "$(echo "$pr_resp" | jq -r .rebaseable)" != "true" ]]; then
41-
echo "GitHub doesn't think that the PR is rebaseable!"
42-
exit 1
41+
echo "GitHub doesn't think that the PR is rebaseable!"
42+
exit 1
4343
fi
4444

4545
if [[ -z "$BASE_BRANCH" ]]; then
46-
echo "Cannot get base branch information for PR #$PR_NUMBER!"
47-
echo "API response: $pr_resp"
48-
exit 1
46+
echo "Cannot get base branch information for PR #$PR_NUMBER!"
47+
echo "API response: $pr_resp"
48+
exit 1
4949
fi
5050

5151
HEAD_REPO=$(echo "$pr_resp" | jq -r .head.repo.full_name)
@@ -54,8 +54,8 @@ HEAD_BRANCH=$(echo "$pr_resp" | jq -r .head.ref)
5454
echo "Base branch for PR #$PR_NUMBER is $BASE_BRANCH"
5555

5656
if [[ "$BASE_REPO" != "$HEAD_REPO" ]]; then
57-
echo "PRs from forks are not supported at the moment."
58-
exit 1
57+
echo "PRs from forks are not supported at the moment."
58+
exit 1
5959
fi
6060

6161
git remote set-url origin https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
@@ -73,7 +73,7 @@ git checkout -b $HEAD_BRANCH origin/$HEAD_BRANCH
7373

7474
# Do an exact check instead of `rebase *` so it's not possible to inject malisios commands
7575
if [[ $(jq -r ".comment.body" "$GITHUB_EVENT_PATH" | grep -Fq "/rebase --autosquash") -eq 0 ]]; then
76-
git rebase --autosquash origin/$BASE_BRANCH
76+
git rebase --autosquash origin/$BASE_BRANCH
7777
else
7878
git rebase origin/$BASE_BRANCH
7979
fi

0 commit comments

Comments
 (0)