Skip to content

chore: add missing Apache 2.0 license headers#6155

Closed
milenvk wants to merge 7 commits into
google:mainfrom
milenvk:fix-missing-licenses
Closed

chore: add missing Apache 2.0 license headers#6155
milenvk wants to merge 7 commits into
google:mainfrom
milenvk:fix-missing-licenses

Conversation

@milenvk

@milenvk milenvk commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):
N/A

2. Or, if no issue exists, describe the change:

Problem:
The repository is missing Apache 2.0 license headers across 155 files. This is required by Google OSPO.

Solution:
Prepended the standard Apache 2.0 open-source license header to all flagged files. The copyright year was dynamically assigned based on each file's first commit year in git history.

Testing Plan

Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed pytest results.
N/A - This PR only adds comments (license headers) to the top of files and contains zero functional code changes. No new tests are needed, and existing tests should pass as-is.

Manual End-to-End (E2E) Tests:
N/A - No functional code was changed.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

@milenvk milenvk force-pushed the fix-missing-licenses branch from b3d85e7 to 36ec9a0 Compare June 17, 2026 22:15
@DeanChensj

Copy link
Copy Markdown
Collaborator

Hi @milenvk , thanks for your contribution, we explicitly excluded those files from the header check in https://github.com/google/adk-python/blob/main/.github/header-checker-lint.yml

Is the policy enforced that even sample config file and js assets need a header?

@milenvk

milenvk commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi @milenvk , thanks for your contribution, we explicitly excluded those files from the header check in https://github.com/google/adk-python/blob/main/.github/header-checker-lint.yml

Is the policy enforced that even sample config file and js assets need a header?

Yes, the policy enforcement requires them in both YAML and JS files.

@milenvk

milenvk commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

I have now updated header-checker-lint.yml to also mandate the license headers in the yml and yaml files. PTAL.

@DeanChensj DeanChensj self-assigned this Jun 22, 2026
copybara-service Bot pushed a commit that referenced this pull request Jun 22, 2026
Merge #6155

**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**

### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**
N/A

**2. Or, if no issue exists, describe the change:**

**Problem:**
The repository is missing Apache 2.0 license headers across 155 files. This is required by Google OSPO.

**Solution:**
Prepended the standard Apache 2.0 open-source license header to all flagged files. The copyright year was dynamically assigned based on each file's first commit year in git history.

### Testing Plan

_Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes._

**Unit Tests:**

- [ ] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

_Please include a summary of passed `pytest` results._
N/A - This PR only adds comments (license headers) to the top of files and contains zero functional code changes. No new tests are needed, and existing tests should pass as-is.

**Manual End-to-End (E2E) Tests:**
N/A - No functional code was changed.

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [ ] I have manually tested my changes end-to-end.
- [ ] Any dependent changes have been merged and published in downstream modules.

### Additional context

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=#6155 from milenvk:fix-missing-licenses d2a264b
PiperOrigin-RevId: 936165783
@adk-bot

adk-bot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thank you @milenvk for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit 3cbcefc.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jun 22, 2026
@adk-bot adk-bot closed this Jun 22, 2026
copybara-service Bot pushed a commit that referenced this pull request Jun 22, 2026
PR #6155 added the Apache license header to this script but dropped its
trailing newline, so the end-of-file-fixer pre-commit hook now fails on
every PR. Restore the newline.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 936246147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants