github-actions[bot] commented on code in PR #62232:
URL: https://github.com/apache/doris/pull/62232#discussion_r3076869950
##########
.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` itself is part of `all_changed_files`, this rewrite
narrows `header.paths` to only that file, but `.licenserc.yaml` is still
excluded by `paths-ignore`. In that case SkyWalking Eyes checks zero headers
and exits successfully, so a broken license-rule change can merge and only fail
later on the full `push` scan for `master`. Please bypass the incremental
config whenever `.licenserc.yaml` changes and run against the full
`.licenserc.yaml` instead.
--
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]