Skip to content

fix #18 - Add GitHub Action to enforce Apache 2.0 license headers#27

Merged
ricardozanini merged 11 commits intoserverlessworkflow:mainfrom
fantonangeli:issue-18-Add-GitHub-Action-to-enforce-Apache-20-license-headers-2
Mar 10, 2026
Merged

fix #18 - Add GitHub Action to enforce Apache 2.0 license headers#27
ricardozanini merged 11 commits intoserverlessworkflow:mainfrom
fantonangeli:issue-18-Add-GitHub-Action-to-enforce-Apache-20-license-headers-2

Conversation

@fantonangeli
Copy link
Contributor

Closes #18

Summary

Add a GitHub Actions workflow that validates Apache 2.0 license headers are present in all applicable source files and fails the build if headers are missing. The check must execute on every Pull Request.

Goals

Ensure all source files comply with Apache 2.0 licensing requirements.

  • Prevent merging code without proper license headers.
  • Automate enforcement instead of relying on manual review.
  • Maintain CNCF/open-source governance standards.

Non-Goals

  • Complex legal compliance tooling beyond header validation.
  • Checking third-party dependency licenses.

@fantonangeli fantonangeli requested review from Copilot, lornakelly and ricardozanini and removed request for Copilot March 5, 2026 16:31
@ricardozanini
Copy link
Member

@fantonangeli you must sign your commits with a key that matches your email.

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli fantonangeli force-pushed the issue-18-Add-GitHub-Action-to-enforce-Apache-20-license-headers-2 branch from 5dd02f0 to 40a08ea Compare March 6, 2026 16:42
fantonangeli added a commit to fantonangeli/serverlessworkflow-editor that referenced this pull request Mar 6, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 17:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automated license-header enforcement using Apache RAT so pull requests fail if files without approved licensing are introduced, supporting the repository’s Apache 2.0 compliance goal.

Changes:

  • Add a CI workflow that runs Apache RAT on pushes to main and on PR events.
  • Introduce .rat-excludes to exclude certain non-source/config/generated files from RAT scanning.
  • Add Apache 2.0 license headers to README.md and .gitignore.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
README.md Adds an Apache 2.0 license header in an HTML comment.
.rat-excludes Defines files to exclude from Apache RAT scanning.
.gitignore Adds an Apache 2.0 license header comment block.
.github/workflows/ci_check_license_headers.yaml New workflow that downloads and runs Apache RAT, failing on unapproved files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli fantonangeli force-pushed the issue-18-Add-GitHub-Action-to-enforce-Apache-20-license-headers-2 branch from 2947dc9 to 68eca73 Compare March 6, 2026 17:29
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings March 6, 2026 18:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…hanges#r2897289283

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…hanges#r2897676663

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings March 9, 2026 17:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@ricardozanini
Copy link
Member

@lornakelly are you going to review this PR?

…-Action-to-enforce-Apache-20-license-headers-2

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@lornakelly
Copy link

@lornakelly are you going to review this PR?

Yes, apologies, I didnt know it needed 2 reviews, im used to one person grabbing a PR to review on first come first served basis and saw you had started review before me. I understand now and will make sure to review all future PRs as well even if someone is already reviewing

Copy link

@lornakelly lornakelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ricardozanini ricardozanini merged commit a80ebb1 into serverlessworkflow:main Mar 10, 2026
1 check passed
@fantonangeli fantonangeli deleted the issue-18-Add-GitHub-Action-to-enforce-Apache-20-license-headers-2 branch March 10, 2026 13:33
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.

Add GitHub Action to enforce Apache 2.0 license headers

4 participants