From ebe6045a480e3418e69f392c947794f4d2aaaad3 Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Sun, 11 Feb 2024 11:23:34 -0800 Subject: [PATCH] build: Use Accept:application/vnd.github.VERSION.sha to get the latest sha of sentry-api-schema repo --- .github/workflows/bump-api-schema-sha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-api-schema-sha.yml b/.github/workflows/bump-api-schema-sha.yml index c86a849ec34f9..81d414cb2103d 100644 --- a/.github/workflows/bump-api-schema-sha.yml +++ b/.github/workflows/bump-api-schema-sha.yml @@ -24,7 +24,7 @@ jobs: git config user.name "openapi-getsentry-bot" filepath="src/build/resolveOpenAPI.ts" - sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')" + sha="$(curl -sSl -H 'Accept: application/vnd.github.VERSION.sha' 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main')" sed -i -e "s|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = '$sha';|g" "$filepath" branch="bot/bump-api-schema-to-${sha:0:8}"