Properly inject the copyright year in the license in pre-built provider repos #2449
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
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:
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 byhashicorp-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:
creationYear
optionTwo 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.
The text was updated successfully, but these errors were encountered: