From cddaa337e124f0694be45267874a0be6cdf4fd6d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 18:58:20 +0000 Subject: [PATCH] ci: fix poetry lock workflow for missing/blank file Co-Authored-By: Aaron Steers --- .github/workflows/poetry-lock-command.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/poetry-lock-command.yml b/.github/workflows/poetry-lock-command.yml index 101c7d760..42f65de6d 100644 --- a/.github/workflows/poetry-lock-command.yml +++ b/.github/workflows/poetry-lock-command.yml @@ -44,6 +44,17 @@ jobs: with: pr: ${{ github.event.inputs.pr }} + - name: Check for blank or missing poetry.lock + run: | + if [ ! -s "poetry.lock" ]; then + echo "poetry.lock missing or blank. Fetching from main branch..." + git fetch origin main + git checkout origin/main -- poetry.lock + echo "Lock file restored from main." + else + echo "poetry.lock found. Proceeding." + fi + - name: Get PR info id: pr-info run: |