Skip to content

Commit 5a71671

Browse files
committed
Fix a couple of mistakes and improve DRYness
- `cat` should have been `echo` - remove debugging setting - refactor a few lines in api_call()
1 parent 095cf41 commit 5a71671

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dev_tools/ci/size-labeler.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ function jq_file() {
7979
}
8080

8181
function api_call() {
82-
set -x
8382
local -r endpoint="${1// /%20}" # love that our label names have spaces...
8483
local -r uri="https://api.github.com/repos/${GITHUB_REPOSITORY}"
8584
local -r url="${uri}/${endpoint}"
@@ -96,12 +95,11 @@ function api_call() {
9695
response_body=$(curl "${curl_opts[@]}" "${@:2}" "${url}")
9796
local exit_status=$?
9897
set -e
98+
echo "${response_body}"
9999
if [[ $exit_status -ne 0 ]]; then
100100
error "GitHub API call failed (curl exit $exit_status) for ${url}"
101-
cat "${response_body}"
102101
exit $exit_status
103102
fi
104-
echo "${response_body}"
105103
}
106104

107105
function compute_changes() {

0 commit comments

Comments
 (0)