Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5dc32e6

Browse files
update
1 parent 1256665 commit 5dc32e6

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

‎.github/workflows/4-bb-export.yml‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,9 @@ jobs:
6464
cat "$temp_file"
6565
echo "------------------------"
6666
67-
if [[ $http_code -lt 200 || $http_code -ge 300 ]]; then
68-
rm "$temp_file"
69-
return 1
70-
fi
71-
67+
# Return the response regardless of status code
68+
# This allows the caller to handle the response
7269
cat "$temp_file"
73-
rm "$temp_file"
74-
return 0
7570
}
7671
7772
MANIFEST_PATH=""
@@ -120,14 +115,23 @@ jobs:
120115
BASE_URL="${{ steps.bytebase-login.outputs.api_url }}"
121116
122117
echo "DEBUG: About to make first API call to create sheet"
123-
sheet_data=$(call_api \
118+
response=$(call_api \
124119
"$BASE_URL/projects/$PROJECT/sheets" \
125120
"POST" \
126121
"{\"title\":\"\",\"content\":\"$SQL_CONTENT\",\"type\":\"TYPE_SQL\",\"source\":\"SOURCE_BYTEBASE_ARTIFACT\",\"visibility\":\"VISIBILITY_PUBLIC\"}" \
127122
"Create Sheet")
128123
129-
echo "DEBUG: After first API call"
130-
SHEET_NAME=$(echo "$sheet_data" | python3 -c "import sys, json; print(json.load(sys.stdin)['name'])")
124+
echo "DEBUG: Raw API Response:"
125+
echo "$response"
126+
127+
# Only try to parse as JSON if we have a response
128+
if [ -n "$response" ]; then
129+
SHEET_NAME=$(echo "$response" | python3 -c "import sys, json; print(json.load(sys.stdin).get('name', ''))" || echo "")
130+
echo "DEBUG: Sheet name: $SHEET_NAME"
131+
else
132+
echo "ERROR: Empty response from API"
133+
exit 1
134+
fi
131135
132136
echo "finishing sheetname ================================================"
133137
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /