Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly inject the copyright year in the license in pre-built provider repos #2449

Open
xiehan opened this issue Dec 23, 2022 · 0 comments
Open
Labels
enhancement New feature or request help wanted Community contributions welcome as the core team is unlikely to work on this soon legal An issue or PR related to compliance with company policies pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager priority/backlog Low priority (though possibly still important). Unlikely to be worked on within the next 6 months. size/medium estimated < 1 week tech-debt

Comments

@xiehan
Copy link
Member

xiehan commented Dec 23, 2022

Context

HashiCorp has been rolling out a policy requiring us to add a copyright notice above the license in all of our open-source repositories. See, for example, LICENSE in this repo. The format of the copyright notice is:

Copyright (c) <-- year of repo creation --> HashiCorp, Inc.

<-- rest of license text -->

HashiCorp's Engineering Services team has created hashicorp-copywrite[bot] to automate creating Dependabot-style PRs injecting the copyright notice at the top of each OSS license file. This practice has worked great for other teams, but not so much for us, since the majority of our projects use Projen, which manages the license file and will overwrite the changes introduced by hashicorp-copywrite[bot].

What has already been done

In hashicorp/cdktf-aws-cdk@add779b @ansgarm figured out how to customize the license file generated by Projen to include the copyright header. In recent weeks, I've been going through our other repositories to apply this technique to make sure we're compliant with the license policy while continuing to have the license file generation managed by Projen.

In cdktf/cdktf-provider-project@84325ff I applied this technique with one additional modification, that allows the copyright year to be specified, because the individual pre-built provider repos technically all have different creation years. For example, cdktf-provider-aws was created in 2020, cdktf-provider-newrelic was created in 2021, and cdktf-provider-salesforce was created in 2022. However, right now, all of their LICENSE files have 2022 as the copyright year, which is the default if no override year is specified. (example)

What still needs to happen

We need to figure out how & where to inject the true creation/copyright year so that the licenses for each of these repos are correct.

Two options for where:

Two options for how:

But maybe there are other options I haven't thought of yet!

Note

I'm assigning this issue to Mark for now to have him take a stab at designing/proposing a solution, but not necessarily implementing it just yet.

@xiehan xiehan added enhancement New feature or request priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/medium estimated < 1 week pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager legal An issue or PR related to compliance with company policies labels Dec 23, 2022
@xiehan xiehan added help wanted Community contributions welcome as the core team is unlikely to work on this soon priority/backlog Low priority (though possibly still important). Unlikely to be worked on within the next 6 months. and removed priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Community contributions welcome as the core team is unlikely to work on this soon legal An issue or PR related to compliance with company policies pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager priority/backlog Low priority (though possibly still important). Unlikely to be worked on within the next 6 months. size/medium estimated < 1 week tech-debt
Projects
None yet
Development

No branches or pull requests

2 participants