Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ jobs:
run: |
git diff --exit-code src/types/ outcome-agent-openapi.yaml partner-api.yaml platform-api.yaml || echo "changed=true" >> $GITHUB_OUTPUT

- name: Close existing auto-update PRs
if: steps.git-check.outputs.changed == 'true'
run: |
# Find and close all existing auto-update PRs
gh pr list --state open --json number,headRefName --jq '.[] | select(.headRefName | startswith("auto-update-openapi-")) | .number' | while read pr_number; do
echo "Closing PR #$pr_number"
gh pr close $pr_number --comment "Closing this PR as a new auto-update is available." --delete-branch
done
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}

- name: Create Pull Request
if: steps.git-check.outputs.changed == 'true'
run: |
Expand Down