From 85c61bcdff6de5b0d44537bb1a81853f5527637a Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 14 Jul 2026 23:00:33 +0000 Subject: [PATCH] fix(actions): only skip PR creation when an open PR exists for the dated branch --- .github/workflows/auto_update_price_and_context_window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_update_price_and_context_window.yml b/.github/workflows/auto_update_price_and_context_window.yml index f3c7a779be0..da96ccffc93 100644 --- a/.github/workflows/auto_update_price_and_context_window.yml +++ b/.github/workflows/auto_update_price_and_context_window.yml @@ -43,7 +43,7 @@ jobs: else git commit -m "Update model_prices_and_context_window.json file: $(date +'%Y-%m-%d')" git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "${BRANCH_NAME}" - if gh pr view "${BRANCH_NAME}" >/dev/null 2>&1; then + if [ "$(gh pr list --head "${BRANCH_NAME}" --state open --json number --jq 'length')" -gt 0 ]; then echo "PR already exists for ${BRANCH_NAME}." else gh pr create --title "Update model_prices_and_context_window.json file" \