github-actions[bot] commented on code in PR #62495:
URL: https://github.com/apache/doris/pull/62495#discussion_r3086662948
##########
.github/workflows/license-eyes.yml:
##########
@@ -48,17 +48,40 @@ 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
- uses: tj-actions/changed-files@v45
- with:
- separator: "\n"
+ run: |
+ base_sha=$(git rev-parse FETCH_HEAD)
+ if ! all=$(git diff --name-only "${base_sha}...HEAD" 2>/dev/null);
then
Review Comment:
This still fails in the runner's shallow-checkout layout. With the exact
sequence used here:
`git fetch --no-tags --depth=1 origin ${{ github.base_ref }}`
`base_sha=$(git rev-parse FETCH_HEAD)`
`git diff --name-only "${base_sha}...HEAD"`
there is often no merge base, and I reproduced that on this PR head in the
Actions workspace (`fatal: ... no merge base`). So the PR path still cannot
reliably compute changed files. This needs either enough history to guarantee a
merge base, or a changed-files mechanism that does not depend on a shallow
three-dot diff.
--
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]