Skip to content

Commit 494dd3d

Browse files
authored
Go through a PR to work with branch protections (#5154)
1 parent 4d8afc8 commit 494dd3d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ jobs:
1818
env:
1919
GITHUB_TOKEN: ${{ github.token }}
2020
run: |
21+
git config user.email "bot@getsentry.com"
22+
git config user.name "openapi-getsentry-bot"
23+
git checkout --branch "bot/bump-api-schema-to-${sha:0:8}"
24+
2125
filepath="src/gatsby/utils/resolveOpenAPI.ts"
2226
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
2327
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"
28+
2629
git add "$filepath"
2730
git commit -m "Bump API schema to ${sha:0:8}"
2831
git push
32+
33+
gh pr create --fill
34+
gh pr merge --squash

0 commit comments

Comments
 (0)