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


##########
.github/workflows/license-eyes.yml:
##########
@@ -48,7 +48,36 @@ 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: Generate incremental licenserc
+        if: github.event_name == 'pull_request_target'
+        env:
+          CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+        run: |
+          python3 - <<'EOF'
+          import yaml, os
+
+          with open('.licenserc.yaml') as f:
+              config = yaml.safe_load(f)
+
+          changed = os.environ.get('CHANGED_FILES', '').strip().split('\n')
+          changed = [p.strip() for p in changed if p.strip()]
+
+          config['header']['paths'] = changed

Review Comment:
   If a PR only deletes files, `steps.changed-files.outputs.all_changed_files` 
is empty. That writes `header.paths: []`, but in SkyWalking Eyes v0.8.0 an 
empty `paths` list is normalized back to `['**']`, so this edge case silently 
falls back to a full-repo scan instead of an incremental one. Please 
short-circuit the workflow when the list is empty, or write a non-empty no-op 
pattern instead.



-- 
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