feat: copyright header for proprietary code#255
Merged
Conversation
# Conflicts: # cmd/dev/headers/license.go # cmd/dev/headers/license_test.go
# Conflicts: # cmd/dev/headers/copyright.go
jonas-jonas
requested changes
Nov 4, 2022
| dir.CreateFile("yaml.yml", "one: two\nalpha: beta") | ||
| dir.CreateFile("yaml.yaml", "one: two\nalpha: beta") | ||
| err := AddHeaders(dir.Path, 2022, []string{}) | ||
| err := AddHeaders(dir.Path, 2022, HEADER_TEMPLATE_OPEN_SOURCE, []string{}) |
Member
There was a problem hiding this comment.
Should we have a test for the proprietary license as well? In case someone changes that text by accident.
Contributor
Author
There was a problem hiding this comment.
Ideally we would have real end-to-end tests for this feature, written in https://github.com/cucumber/godog. The infrastructure for that is missing and it doesn't make sense to add it just for these internal features.
Following your suggestion, I have added unit tests that at least demo how the file contents would look like for the different template types.
| // contains the folders to exclude | ||
| var exclude []string | ||
|
|
||
| // indicates whether to create a headerType header ( |
Member
There was a problem hiding this comment.
Suggested change
| // indicates whether to create a headerType header ( | |
| // indicates whether to create a headerType header |
# Conflicts: # cmd/dev/headers/copyright_test.go
Contributor
Author
|
@jonas-jonas all comments address, PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow adding copyright headers for proprietary code.
Related Issue or Design Document
https://github.com/ory-corp/cloud/issues/3706
Checklist
and signed the CLA.
introduces a new feature.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).