github-actions[bot] commented on code in PR #62495:
URL: https://github.com/apache/doris/pull/62495#discussion_r3080882111
##########
.github/workflows/license-eyes.yml:
##########
@@ -48,17 +48,29 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
+ - name: Fetch base branch for diff
+ if: github.event_name == 'pull_request_target'
Review Comment:
`git diff FETCH_HEAD...HEAD` needs a merge base, but this workflow is still
running in a shallow checkout (`actions/checkout` defaults to depth 1, and this
fetch is also depth 1). On a normal PR that means the merge base is often
missing, so the new step fails before generating `.licenserc-incremental.yaml`.
I reproduced it with this PR's commits in a fresh clone:
```bash
git fetch --depth=1 origin f75194aef28615ea111ae0e1dfff99e8297e1cbd
git checkout FETCH_HEAD
git fetch --no-tags --depth=1 origin master
git diff --name-only FETCH_HEAD...HEAD
# fatal: FETCH_HEAD...HEAD: no merge base
```
The previous `tj-actions/changed-files` implementation handled this case, so
this is a workflow regression. Please fetch enough history before using `...`
(for example a full checkout or an explicit merge-base-aware fetch), or switch
to a diff method that does not depend on the merge base.
--
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]