Skip to content

Commit

Permalink
Auto merge of #3429 - hi-rustin:rustin-patch-feat, r=jtgeibel
Browse files Browse the repository at this point in the history
start accepting crates without authorship information

See rust-lang/rust#83227
  • Loading branch information
bors committed Mar 19, 2021
2 parents 9ebdc2b + 48504b1 commit 05fa01b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/controllers/krate/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,6 @@ fn parse_new_headers(req: &mut dyn RequestExt) -> AppResult<EncodableCrateUpload
if empty(new.license.as_ref()) && empty(new.license_file.as_ref()) {
missing.push("license");
}
if new.authors.iter().all(String::is_empty) {
missing.push("authors");
}
if !missing.is_empty() {
let message = missing_metadata_error_message(&missing);
return Err(cargo_err(&message));
Expand Down
6 changes: 3 additions & 3 deletions src/tests/krate/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ fn ignored_badges() {
}

#[test]
fn author_license_and_description_required() {
fn license_and_description_required() {
let (_, _, _, token) = TestApp::init().with_token();

let crate_to_publish = PublishBuilder::new("foo_metadata")
Expand All @@ -831,7 +831,7 @@ fn author_license_and_description_required() {
assert_eq!(response.status(), StatusCode::OK);
assert_eq!(
response.json(),
json!({ "errors": [{ "detail": missing_metadata_error_message(&["description", "license", "authors"]) }] })
json!({ "errors": [{ "detail": missing_metadata_error_message(&["description", "license"]) }] })
);

let crate_to_publish = PublishBuilder::new("foo_metadata")
Expand All @@ -844,7 +844,7 @@ fn author_license_and_description_required() {
assert_eq!(response.status(), StatusCode::OK);
assert_eq!(
response.json(),
json!({ "errors": [{ "detail": missing_metadata_error_message(&["description", "authors"]) }] })
json!({ "errors": [{ "detail": missing_metadata_error_message(&["description"]) }] })
);

let crate_to_publish = PublishBuilder::new("foo_metadata")
Expand Down

0 comments on commit 05fa01b

Please sign in to comment.