Skip to content

Commit

Permalink
Issue #113: fix indent reccomendations
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Apr 5, 2024
1 parent 11287fb commit cabd140
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/workflow-bytebase-sql-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ jobs:
pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
repository=`echo $GITHUB_REPOSITORY`
request_body=$(jq -n \
--arg repositoryId "$repository" \
--arg pullRequestId $pull_number \
--arg webURL "$GITHUB_SERVER_URL" \
'$ARGS.named')
--arg repositoryId "$repository" \
--arg pullRequestId $pull_number \
--arg webURL "$GITHUB_SERVER_URL" \
'$ARGS.named')
response=$(curl -s -w "%{http_code}" -X POST $API \
-H "X-SQL-Review-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d "$request_body")
-H "X-SQL-Review-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d "$request_body")
echo "::debug::response $response"
http_code=$(tail -n1 <<< "$response")
body=$(sed '$ d' <<< "$response")
if [ $http_code != 200 ]; then
echo ":error::Failed to check SQL with response code $http_code and body $body"
echo ":error::Failed to check SQL with response code $http_code and body $body"
exit 1
fi
status=$(echo $body | jq -r '.status')
content=$(echo $body | jq -r '.content')
while read message; do
echo $message
echo $message
done <<< "$(echo $content | jq -r '.[]')"
if [ "$status" != "SUCCESS" ]; then exit 1; fi

0 comments on commit cabd140

Please sign in to comment.