Skip to content

Commit 64d2181

Browse files
masciCopilot
andauthored
oss policy review check (#23)
This pull request introduces a CI workflow to enforce license headers and adds the required Elastic License 2.0 header to several Python package `__init__.py` files. The main goal is to ensure all source files comply with licensing requirements. **CI/CD Improvements:** * Added a `license-headers` job to the GitHub Actions workflow (`.github/workflows/ci.yml`) that checks all `.py` files (excluding `.venv`, `dist`, and `build` directories) for the Elastic License 2.0 header and fails the build if any files are missing it. **License Compliance:** * Added the Elastic License 2.0 header to the `__init__.py` files in the following directories: `examples/chatbot_rag_app/datasets`, `examples/chatbot_rag_app/evaluators`, `examples/chatbot_rag_app/tasks`, `examples/claude_code_eval`, `examples/claude_code_eval/datasets`, `examples/claude_code_eval/evaluators`, and `examples/claude_code_eval/tasks`.## Summary --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 2e9adf9 commit 64d2181

8 files changed

Lines changed: 30 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ repos:
55
- id: ruff-check
66
args: [--fix]
77
- id: ruff-format
8+
9+
- repo: local
10+
hooks:
11+
- id: license-headers
12+
name: Check Elastic License 2.0 headers
13+
entry: bash -c 'missing=$(grep -L "Licensed under the Elastic License 2.0" "$@"); if [ -n "$missing" ]; then echo "Files missing Elastic License 2.0 header:"; echo "$missing"; exit 1; fi' --
14+
language: system
15+
types: [python]
16+
exclude: ^(\.venv|dist|build)/
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
# you may not use this file except in compliance with the Elastic License 2.0.

0 commit comments

Comments
 (0)