From d5cf8f5ea5a4f597fc00ea3ac34f11f103098dfb 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:14:28 +0000 Subject: [PATCH] ci: check for missing/blank poetry.lock and fetch from main 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 19a7a1e15..718cbcf15 100644 --- a/.github/workflows/poetry-lock-command.yml +++ b/.github/workflows/poetry-lock-command.yml @@ -36,6 +36,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: |