From 96dc5df3680199e9f0f71079b38cc3d59abc66cd Mon Sep 17 00:00:00 2001 From: centdix <40307056+centdix@users.noreply.github.com> Date: Fri, 20 Jun 2025 20:38:46 +0200 Subject: [PATCH] close old bump prs (#6019) --- .github/workflows/helmchart_on_release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/helmchart_on_release.yml b/.github/workflows/helmchart_on_release.yml index b3bc4e8c2f..0a4ee872ce 100644 --- a/.github/workflows/helmchart_on_release.yml +++ b/.github/workflows/helmchart_on_release.yml @@ -57,6 +57,23 @@ jobs: APP_VERSION=${APP_VERSION%/} sed -i "s/appVersion: .*/appVersion: $APP_VERSION/" ./charts/windmill/Chart.yaml + - name: Close existing bump-helm PRs + env: + GH_TOKEN: ${{ steps.app.outputs.token }} + run: | + # List open PR numbers whose title starts with the prefix + prs=$(gh pr list \ + --state open \ + --search '"helm: bump version to" in:title' \ + --json number \ + -q '.[].number') + + for pr in $prs; do + echo "Closing outdated bump PR #$pr" + gh pr close "$pr" \ + --comment "Closed automatically – superseded by a newer Helm-chart bump PR." + done + - name: Commit and push run: | git add .