diff --git a/.github/workflows/bump-api-schema-sha.yml b/.github/workflows/bump-api-schema-sha.yml index fc390504f0513..feb557065e366 100644 --- a/.github/workflows/bump-api-schema-sha.yml +++ b/.github/workflows/bump-api-schema-sha.yml @@ -20,15 +20,16 @@ jobs: run: | git config user.email "bot@getsentry.com" git config user.name "openapi-getsentry-bot" - git checkout -b "bot/bump-api-schema-to-${sha:0:8}" filepath="src/gatsby/utils/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 }')" 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}" + git checkout -b "$branch" git add "$filepath" git commit -m "Bump API schema to ${sha:0:8}" - git push + git push --set-upstream origin "$branch" gh pr create --fill gh pr merge --squash