-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow setting spdx_license_id in module upload #134
base: main
Are you sure you want to change the base?
Conversation
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
buf/registry/module/v1/commit.proto
Outdated
// May be empty if the SPDX License Identifier was not explicitly set during upload, if the | ||
// license file was not present, or if it was not possible to detect the SPDX License Identifier | ||
// from the license file. | ||
string spdx_license_id = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we validate these strings w/ regex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. I went through the IDs and concluded they only contain characters a-z, A-Z, 0-9, dashes, periods, plusses. I added bufbuild/spdx-go#2 to verify this whenever we update the list. This should be the regex for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember what the thinking was but I explicitly didn't want to do this for some reason when I looked into it #18
There's probably more of an argument to do add it now, especially since we allow this field to be explicitly set in PluginInfo. |
Also added to |
This PR adds
spdx_license_id
field to moduleUploadRequest
. The goal is to offer users more control over the resulting spdx license identifier that gets exposed once a module has been published. Such as in Generated SDKs.The intention is to add a
--spdx-license-id
flag (or--license
if we wanted to keep it short) to thebuf push
command.For this to be useful, we need to expand the spdx expression logic to support (in addition to the SPDX License List):
Reference