Skip to content

Commit 9f9d7ac

Browse files
authored
Fix bugs in PR branch name and push (#5156)
1 parent 7fb98b2 commit 9f9d7ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ jobs:
2020
run: |
2121
git config user.email "[email protected]"
2222
git config user.name "openapi-getsentry-bot"
23-
git checkout -b "bot/bump-api-schema-to-${sha:0:8}"
2423
2524
filepath="src/gatsby/utils/resolveOpenAPI.ts"
2625
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
2726
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$sha'"|g' "$filepath"
2827
28+
branch="bot/bump-api-schema-to-${sha:0:8}"
29+
git checkout -b "$branch"
2930
git add "$filepath"
3031
git commit -m "Bump API schema to ${sha:0:8}"
31-
git push
32+
git push --set-upstream origin "$branch"
3233
3334
gh pr create --fill
3435
gh pr merge --squash

0 commit comments

Comments
 (0)