Skip to content

Commit 4d8afc8

Browse files
authored
Fix bugs in API SHA bump workflow (#5153)
1 parent e857840 commit 4d8afc8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/bump-api-schema-sha.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Bump API Schema SHA
22
on:
33

4-
# This could be run manually, but general expectation is that this fires from GHA in
5-
# getsentry/sentry-api-schema on changes there. See:
4+
# This could be run manually, but the general expectation is that this fires
5+
# from GHA in getsentry/sentry-api-schema on changes there. See:
66
#
7-
# https://develop.sentry.dev/api/public/#build-process
7+
# https://develop.sentry.dev/api/public/#build-process
88

99
workflow_dispatch:
1010
jobs:
@@ -20,7 +20,9 @@ jobs:
2020
run: |
2121
filepath="src/gatsby/utils/resolveOpenAPI.ts"
2222
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
23-
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$SHA'"|g' "$filepath"
23+
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$sha'"|g' "$filepath"
24+
git config user.email "bot@getsentry.com"
25+
git config user.name "openapi-getsentry-bot"
2426
git add "$filepath"
25-
git commit -m "Bump API schema to $sha"
27+
git commit -m "Bump API schema to ${sha:0:8}"
2628
git push

0 commit comments

Comments
 (0)