Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(ci): scope PR path detection to head changes
chengyongru9070d7489a7d
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 9b6e49beb..526219705 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -33,13 +33,20 @@ jobs:id: pathsshell: bashenv:+ EVENT_NAME: ${{ github.event_name }}BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}- HEAD_SHA: ${{ github.sha }}+ HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}run: |python_required=true+ if [[ "$EVENT_NAME" == "pull_request" ]]; then+ diff_range="${BASE_SHA}...${HEAD_SHA}"+ else+ diff_range="${BASE_SHA}..${HEAD_SHA}"+ fi+if git cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null &&- changed_files="$(git diff --name-only --no-renames "$BASE_SHA" "$HEAD_SHA")" &&+ changed_files="$(git diff --name-only --no-renames "$diff_range")" &&[[ -n "$changed_files" ]] &&! grep -qvE '^(webui/|nanobot/channels/[^/]+/webui/|docs/)' <<< "$changed_files"; thenpython_required=false