From e8beb45c3664e8f0a1fa3759b35f085fefb9e217 Mon Sep 17 00:00:00 2001 From: Sam Estrin Date: Sun, 12 Jul 2026 18:05:37 -0700 Subject: [PATCH] ci: auto-merge daily quickstart refresh PR Daily refresh PRs were opening correctly but never merged, leaving quickstart-{alibaba,synthetic}.json stale on main (last merge 2026-04-30 while fresh data sat in an unmerged PR for ~10 weeks). Add a final `gh pr merge --squash --delete-branch` step that runs when create-pull-request produces a PR, gated on the in-run pytest + v2 schema gate that already precede PR creation. No branch protection or repo auto-merge setting required. Note: GITHUB_TOKEN merges suppress push events, so the Test Suite workflow will not re-run on main for auto-merged JSON refreshes; the refresh is self-validated earlier in the same run. --- .github/workflows/update-quickstart.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-quickstart.yml b/.github/workflows/update-quickstart.yml index 1170058..10ebb3a 100644 --- a/.github/workflows/update-quickstart.yml +++ b/.github/workflows/update-quickstart.yml @@ -37,6 +37,7 @@ jobs: run: python -m scripts.update_quickstart - name: Open PR if files changed + id: create-pr uses: peter-evans/create-pull-request@v6 with: commit-message: "chore: refresh quickstart JSON files" @@ -46,9 +47,18 @@ jobs: `quickstart-alibaba.json`. Triggered by `.github/workflows/update-quickstart.yml`. - Review the model diff before merging. + This PR is merged automatically by the workflow once the + in-run pytest + v2 schema gate pass. If the model diff looks + wrong, audit the commit history on `main`. branch: automated/quickstart-refresh delete-branch: true add-paths: | quickstart-synthetic.json quickstart-alibaba.json + + - name: Auto-merge the refresh PR + if: steps.create-pr.outputs.pull-request-number != '' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }} + run: gh pr merge "$PR_NUMBER" --squash --delete-branch