github-actions[bot] commented on code in PR #62534:
URL: https://github.com/apache/doris/pull/62534#discussion_r3087320197
##########
.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:
Using `GET /pulls/{number}/files` here introduces a correctness regression.
GitHub documents that this endpoint returns at most 3000 files total even with
pagination, so on any larger PR `all`/`acmr` becomes incomplete and
`skywalking-eyes` will silently skip license checking for files past that cap.
It also removes the previous fallback to a full `.licenserc.yaml` scan when
enumeration fails, because a transient `gh api` error now aborts the step under
`bash -e`. Could we keep the local `git diff "${base_sha}...HEAD"` path (or
another uncapped source) and only use the API as a fallback?
##########
.licenserc.yaml:
##########
@@ -96,15 +101,18 @@ header:
- "conf/mysql_ssl_default_certificate/client_certificate/ca.pem"
Review Comment:
I do not think these first-party text configs should be excluded from header
checking. Both `conf/ubsan_ignorelist.txt` and
`extension/dbt-doris/dev-requirements.txt` accept `#` comments, and comparable
files in-tree already carry ASF headers (`pytest/requirements.txt`,
`tools/cost_model_evaluate/requirements.txt`, `extension/dbt-doris/tox.ini`,
etc.). Adding them to `paths-ignore` weakens license coverage instead of fixing
the missing headers in-place.
--
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]