github-actions[bot] commented on code in PR #62232:
URL: https://github.com/apache/doris/pull/62232#discussion_r3063963740


##########
.github/workflows/license-eyes.yml:
##########
@@ -48,7 +48,60 @@ jobs:
         with:
           ref: ${{ github.event.pull_request.head.sha }}
 
+      - name: Get changed files
+        if: github.event_name == 'pull_request_target'
+        id: changed-files
+        uses: tj-actions/changed-files@v45
+        with:
+          separator: "\n"
+
+      - name: Detect licenserc change
+        if: github.event_name == 'pull_request_target' && 
steps.changed-files.outputs.all_changed_files != ''
+        id: detect-licenserc
+        env:
+          CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+        run: |
+          if echo "$CHANGED_FILES" | grep -qxF '.licenserc.yaml'; then
+            echo "full_scan=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "full_scan=false" >> "$GITHUB_OUTPUT"
+          fi
+
+      - name: Generate incremental licenserc
+        if: >-
+          github.event_name == 'pull_request_target' &&
+          steps.changed-files.outputs.all_changed_files != '' &&
+          steps.detect-licenserc.outputs.full_scan != 'true'
+        env:
+          CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+        run: |
+          python3 - <<'EOF'
+          import yaml, os
+
+          with open('.licenserc.yaml') as f:

Review Comment:
   `with open('.licenserc.yaml')` still assumes the config file exists in the 
PR head, but the new fallback logic only inspects 
`steps.changed-files.outputs.all_changed_files`. `tj-actions/changed-files` 
defines that output as ACMR-only, so a PR that deletes or renames 
`.licenserc.yaml` is invisible here. In the concrete case `delete 
.licenserc.yaml + modify be/src/...`, `Detect licenserc change` stays false and 
this step throws `FileNotFoundError` before the license check runs. Please 
include deleted/renamed config-file detection in the full-scan fallback (for 
example via `all_modified_files` / `deleted_files`) or guard this open 
accordingly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to