Skip to content

fix(provider): apply OpenAI schema sanitization for GitHub Copilot #244

fix(provider): apply OpenAI schema sanitization for GitHub Copilot

fix(provider): apply OpenAI schema sanitization for GitHub Copilot #244

Workflow file for this run

name: generate
on:
push:
branches:
- dev
jobs:
generate:
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/actions/setup-bun
- name: Setup git committer
id: committer
continue-on-error: true
uses: ./.github/actions/setup-git-committer
with:
cyberstrike-app-id: ${{ vars.CYBERSTRIKE_APP_ID }}
cyberstrike-app-secret: ${{ secrets.CYBERSTRIKE_APP_SECRET }}
- name: Fallback git config
if: steps.committer.outcome == 'failure'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Generate
run: ./script/generate.ts
- name: Commit and push
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
git add -A
git commit -m "chore: generate" --allow-empty
git push origin HEAD:${{ github.ref_name }} --no-verify
# if ! git push origin HEAD:${{ github.event.pull_request.head.ref || github.ref_name }} --no-verify; then
# echo ""
# echo "============================================"
# echo "Failed to push generated code."
# echo "Please run locally and push:"
# echo ""
# echo " ./script/generate.ts"
# echo " git add -A && git commit -m \"chore: generate\" && git push"
# echo ""
# echo "============================================"
# exit 1
# fi