diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 2b9ecba..dcb9bf8 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -36,7 +36,8 @@ jobs: - name: Run pylint (backend only on changed files) run: | source venv/bin/activate - changed_files=$(git diff --name-only HEAD^..HEAD | grep '\.py$' || true) + # Compare against the remote main branch to handle the first commit + changed_files=$(git diff --name-only origin/main...HEAD | grep '\.py$' || true) if [ -n "$changed_files" ]; then pylint $changed_files --exit-zero | tee pylint.log else