Skip to content

GitHub Action to verify that newly added files have the license header.#6392

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:gha-check-license-headers
Jan 6, 2026
Merged

GitHub Action to verify that newly added files have the license header.#6392
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:gha-check-license-headers

Conversation

@dlvenable

@dlvenable dlvenable commented Jan 6, 2026

Copy link
Copy Markdown
Member

Description

We have many PRs without license headers or the old two-line license header. This PR adds a check for new files to spot check for the license headers.

If it finds files with missing headers, it will create a GitHub comment listing all the files. It also directs authors to the relevant license header documentation.

I considered Checkstyle/Spotless changes, but these will be hard to manage until we get it all cleaned up. For example, I have #6390 open to fix just a small set and it is already a large PR. The GHA approach is a good way to keep pushing forward and catching the issues before code is merged. We can continue to backfill with more certainty of not getting new files without the headers.

You can see some actual runs here:

Issues Resolved

N/A

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable dlvenable force-pushed the gha-check-license-headers branch from 8bb1808 to ec20443 Compare January 6, 2026 17:45
@dlvenable dlvenable merged commit 43af421 into opensearch-project:main Jan 6, 2026
54 of 56 checks passed
wandna-amazon pushed a commit to wandna-amazon/data-prepper that referenced this pull request Jan 8, 2026
…r. (opensearch-project#6392)

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
@dlvenable dlvenable deleted the gha-check-license-headers branch January 9, 2026 16:55
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…r. (opensearch-project#6392)

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Simon ELBAZ <elbazsimon9@gmail.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…r. (opensearch-project#6392)

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…r. (opensearch-project#6392)

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants