github-actions[bot] commented on code in PR #62534:
URL: https://github.com/apache/doris/pull/62534#discussion_r3087313824
##########
.github/workflows/license-eyes.yml:
##########
@@ -48,24 +48,20 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- - name: Fetch base branch for diff
- if: github.event_name == 'pull_request_target'
- run: git fetch --no-tags --depth=1 origin ${{ github.base_ref }}
-
- name: Get changed files
if: github.event_name == 'pull_request_target'
id: changed-files
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- base_sha=$(git rev-parse FETCH_HEAD)
- if ! all=$(git diff --name-only "${base_sha}...HEAD" 2>/dev/null);
then
- echo "config_file=.licenserc.yaml" >> "$GITHUB_OUTPUT"
- exit 0
- fi
+ all=$(gh api repos/${{ github.repository }}/pulls/${{
github.event.pull_request.number }}/files \
Review Comment:
GitHub's endpoint is capped at 3000 files, even with pagination. That means
both and become truncated on very large PRs, and the incremental license
config will silently stop checking changed files after the cutoff. The previous
approach did not have that ceiling, so this is a real coverage regression for
the license check. Please keep an uncapped diff source here, for example by
fetching the base ref and using local .
##########
.github/workflows/license-eyes.yml:
##########
@@ -48,24 +48,20 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- - name: Fetch base branch for diff
- if: github.event_name == 'pull_request_target'
- run: git fetch --no-tags --depth=1 origin ${{ github.base_ref }}
-
- name: Get changed files
if: github.event_name == 'pull_request_target'
id: changed-files
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Review Comment:
The old implementation degraded to a full scan when changed-file discovery
failed. Here the step runs under Actions' default , so a transient failure from
either command exits immediately from the assignment and skips any fallback.
That turns a recoverable discovery failure into a hard CI failure and makes the
workflow more fragile than before.
--
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]