From f5b5080df04924fe7211780addca263f63389db2 Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Sat, 28 Mar 2026 11:19:57 -0400 Subject: [PATCH 1/2] Sync Stainless config on main pushes Run the canonical Stainless sync on pushes to main and include stainless.yaml so repo config changes propagate to the live Stainless project. Made-with: Cursor --- .github/workflows/stainless-sdks.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/stainless-sdks.yml b/.github/workflows/stainless-sdks.yml index b0173fc4..995b146e 100644 --- a/.github/workflows/stainless-sdks.yml +++ b/.github/workflows/stainless-sdks.yml @@ -6,10 +6,12 @@ on: - opened - synchronize - reopened - - closed + push: + branches: + - main concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: @@ -20,7 +22,7 @@ env: jobs: preview: - if: github.event.action != 'closed' + if: github.event_name == 'pull_request' runs-on: ubuntu-latest permissions: contents: read @@ -42,24 +44,23 @@ jobs: make_comment: true github_token: ${{ secrets.GITHUB_TOKEN }} - merge: - if: github.event.action == 'closed' && github.event.pull_request.merged == true + sync_main: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: contents: read - pull-requests: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Run merge build + - name: Sync canonical Stainless config uses: stainless-api/upload-openapi-spec-action/merge@v1 with: stainless_api_key: ${{ secrets.STAINLESS_API_KEY }} org: ${{ env.STAINLESS_ORG }} project: ${{ env.STAINLESS_PROJECT }} oas_path: ${{ env.OAS_PATH }} - make_comment: true - github_token: ${{ secrets.GITHUB_TOKEN }} + config_path: ${{ env.CONFIG_PATH }} + make_comment: false From 6c62a51a5f95e592d72cbf0442209f6308a28d4a Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Sat, 28 Mar 2026 11:24:24 -0400 Subject: [PATCH 2/2] Keep Stainless sync on merged PRs Restore PR-only Stainless automation so merge comments still appear, while continuing to send stainless.yaml during the canonical merge sync. Made-with: Cursor --- .github/workflows/stainless-sdks.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/stainless-sdks.yml b/.github/workflows/stainless-sdks.yml index 995b146e..de4682a6 100644 --- a/.github/workflows/stainless-sdks.yml +++ b/.github/workflows/stainless-sdks.yml @@ -6,12 +6,10 @@ on: - opened - synchronize - reopened - push: - branches: - - main + - closed concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true env: @@ -22,7 +20,7 @@ env: jobs: preview: - if: github.event_name == 'pull_request' + if: github.event.action != 'closed' runs-on: ubuntu-latest permissions: contents: read @@ -44,18 +42,19 @@ jobs: make_comment: true github_token: ${{ secrets.GITHUB_TOKEN }} - sync_main: - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + merge: + if: github.event.action == 'closed' && github.event.pull_request.merged == true runs-on: ubuntu-latest permissions: contents: read + pull-requests: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Sync canonical Stainless config + - name: Run merge build uses: stainless-api/upload-openapi-spec-action/merge@v1 with: stainless_api_key: ${{ secrets.STAINLESS_API_KEY }} @@ -63,4 +62,5 @@ jobs: project: ${{ env.STAINLESS_PROJECT }} oas_path: ${{ env.OAS_PATH }} config_path: ${{ env.CONFIG_PATH }} - make_comment: false + make_comment: true + github_token: ${{ secrets.GITHUB_TOKEN }}