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

Allow setting spdx_license_id in module upload #134

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions buf/registry/module/v1/commit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,14 @@ message Commit {
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
// The SPDX License Identifier of the Commit.
//
// 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 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$",
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
}
7 changes: 7 additions & 0 deletions buf/registry/module/v1/upload_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ message UploadRequest {
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
// The SPDX License Identifier. If this field is not set, the SPDX License Identifier will be
// detected from the license file, if present.
string spdx_license_id = 5 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$",
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
}
// The Contents of all references.
repeated Content contents = 1 [(buf.validate.field).repeated.min_items = 1];
Expand Down
10 changes: 10 additions & 0 deletions buf/registry/module/v1beta1/commit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,14 @@ message Commit {
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
// The SPDX License Identifier of the Commit.
//
// 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 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$",
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
}
7 changes: 7 additions & 0 deletions buf/registry/module/v1beta1/upload_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ message UploadRequest {
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
// The SPDX License Identifier. If this field is not set, the SPDX License Identifier will be
// detected from the license file, if present.
string spdx_license_id = 5 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$",
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
}
// The Contents of all references.
repeated Content contents = 1 [(buf.validate.field).repeated.min_items = 1];
Expand Down