github-actions[bot] commented on code in PR #62232:
URL: https://github.com/apache/doris/pull/62232#discussion_r3063906412
##########
.github/workflows/license-eyes.yml:
##########
@@ -48,7 +48,37 @@ 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' &&
steps.changed-files.outputs.all_changed_files != ''
+ 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:
When `.licenserc.yaml` is the only changed file in a PR, `changed` becomes
just that file, but `.licenserc.yaml` is still excluded by `paths-ignore`. That
means the incremental run checks zero headers and a broken config update can
merge, then fail only later on the `push` workflow for `master`. Please keep
the incremental path for normal source-file PRs, but fall back to the full
`.licenserc.yaml` scan whenever the license config itself changes.
--
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]