From c087731fc217dbe64464d9ae797f29cf507d438f Mon Sep 17 00:00:00 2001 From: jottakka Date: Fri, 10 Jul 2026 17:12:01 -0300 Subject: [PATCH 1/2] fix: reuse stable branch for toolkit docs auto-PRs Use a fixed automation/toolkit-docs branch so scheduled runs update the open auto-PR with the latest generated docs instead of opening a duplicate each time. Co-authored-by: Cursor --- .github/workflows/generate-toolkit-docs.md | 2 +- .github/workflows/generate-toolkit-docs.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-toolkit-docs.md b/.github/workflows/generate-toolkit-docs.md index 72d3e41e3..4ef6fbdd4 100644 --- a/.github/workflows/generate-toolkit-docs.md +++ b/.github/workflows/generate-toolkit-docs.md @@ -7,7 +7,7 @@ This workflow regenerates toolkit JSON and opens a PR with the changes. It can b 1. Builds the toolkit docs generator. 2. Generates toolkit JSON in `toolkit-docs-generator/data/toolkits` using the Engine tool metadata and summary endpoints. 3. Syncs integrations sidebar navigation from the generated JSON. -4. Creates a PR if any files changed. +4. Creates or updates a PR on the stable `automation/toolkit-docs` branch if any files changed. Later runs overwrite that open PR with the latest generated docs. ## Inputs and secrets diff --git a/.github/workflows/generate-toolkit-docs.yml b/.github/workflows/generate-toolkit-docs.yml index f1f9035bc..252999528 100644 --- a/.github/workflows/generate-toolkit-docs.yml +++ b/.github/workflows/generate-toolkit-docs.yml @@ -110,7 +110,10 @@ jobs: - Deploy env: ${{ github.event.client_payload.env || 'unknown' }} - Deploy SHA: ${{ github.event.client_payload.deploy_sha || 'unknown' }} - Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - branch: automation/toolkit-docs-${{ github.run_id }} + # Stable branch so later runs update the open auto-PR instead of + # opening a new one each time. create-pull-request force-pushes the + # latest generated docs onto this branch. + branch: automation/toolkit-docs delete-branch: true - name: Request team review From 19216b39658702db0e52e6e56f3b1694d1cb325a Mon Sep 17 00:00:00 2001 From: jottakka Date: Fri, 10 Jul 2026 17:27:30 -0300 Subject: [PATCH 2/2] fix: serialize toolkit docs PR updates Co-authored-by: Cursor --- .github/workflows/generate-toolkit-docs.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/generate-toolkit-docs.yml b/.github/workflows/generate-toolkit-docs.yml index 252999528..b342c21df 100644 --- a/.github/workflows/generate-toolkit-docs.yml +++ b/.github/workflows/generate-toolkit-docs.yml @@ -4,7 +4,7 @@ name: Generate toolkit docs # 1) Build the toolkit docs generator # 2) Generate toolkit JSON into toolkit-docs-generator/data/toolkits # 3) Sync integrations sidebar _meta.tsx from toolkit-docs-generator/data/toolkits -# 4) Open a PR if changes were produced +# 4) Create or update a PR if changes were produced on: repository_dispatch: @@ -18,6 +18,10 @@ permissions: contents: write pull-requests: write +concurrency: + group: generate-toolkit-docs + cancel-in-progress: true + jobs: generate: runs-on: ubuntu-latest @@ -84,17 +88,7 @@ jobs: - name: Sync toolkit sidebar navigation run: pnpm dlx tsx toolkit-docs-generator/scripts/sync-toolkit-sidebar.ts --remove-empty-sections=false --verbose - - name: Check for changes - id: check-changes - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "has_changes=true" >> $GITHUB_OUTPUT - else - echo "has_changes=false" >> $GITHUB_OUTPUT - fi - - name: Create pull request - if: steps.check-changes.outputs.has_changes == 'true' id: cpr uses: peter-evans/create-pull-request@v7 env: @@ -117,7 +111,7 @@ jobs: delete-branch: true - name: Request team review - if: steps.check-changes.outputs.has_changes == 'true' && steps.cpr.outputs.pull-request-number != '' + if: steps.cpr.outputs.pull-request-number != '' continue-on-error: true run: gh pr edit ${{ steps.cpr.outputs.pull-request-number }} --add-reviewer ArcadeAI/engineering-tools-and-dx env: