From 376b32219bd40add47a70ed64e7a7def68a7a4ce Mon Sep 17 00:00:00 2001 From: Prince D Rusweka Rwabongoya Date: Sat, 26 Apr 2025 03:28:16 -0400 Subject: [PATCH] Update backend-ci.yml --- .github/workflows/backend-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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