From 9c85a8e6570f4203fca36a79b874ede6cc532184 Mon Sep 17 00:00:00 2001 From: Cody Guldner Date: Fri, 17 Jul 2026 13:55:21 -0500 Subject: [PATCH 1/2] Close stale spec-update PRs before opening a new one Add a step to close any existing open PRs with the "automated-spec-update" label before creating a new PR, and label new PRs accordingly. Also removes team-reviewers since the app token cannot request team reviews. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/spec_update.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index 0309c064..f96d1b1c 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -84,6 +84,17 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt python generate_base_client.py + + - name: Close Old Pull Requests + if: steps.git-diff-num.outputs.num-diff != 0 + run: | + gh pr list --label "automated-spec-update" --state open --json number --jq '.[].number' | while read -r pr_num; do + echo "Closing old PR #$pr_num" + gh pr close "$pr_num" --delete-branch + done + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + - name: Create Pull Request id: create-pr uses: peter-evans/create-pull-request@v8 @@ -98,9 +109,8 @@ jobs: body: | ${{ steps.git-diff.outputs.commit}} base: 'main' - team-reviewers: | - owners - maintainers + labels: | + automated-spec-update draft: false # - name: Enable Pull Request Automerge From 32520699110834b9cb6d2089d7b51624779d9bf0 Mon Sep 17 00:00:00 2001 From: Cody Guldner Date: Fri, 17 Jul 2026 13:57:03 -0500 Subject: [PATCH 2/2] Close stale spec-update PRs and include date in PR title - Add a step to close existing open PRs with the "automated-spec-update" label before creating a new one, preventing stale PRs from accumulating - Include the formatted date in the PR title for easier identification - Label new spec-update PRs with "automated-spec-update" - Remove team-reviewers (the app token cannot request team reviews) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/spec_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spec_update.yml b/.github/workflows/spec_update.yml index f96d1b1c..dc8a7645 100644 --- a/.github/workflows/spec_update.yml +++ b/.github/workflows/spec_update.yml @@ -105,7 +105,7 @@ jobs: ${{ steps.git-diff.outputs.commit}} branch: ${{ steps.git-branch.outputs.branch }} delete-branch: true - title: 'Automated Spec Update' + title: 'Automated Spec Update - ${{ steps.current-time.outputs.formattedTime }}' body: | ${{ steps.git-diff.outputs.commit}} base: 'main'