Skip to content

publish: Use links field from embedded Cargo.toml file #7204

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

Merged
merged 2 commits into from
Sep 28, 2023
Merged
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
3 changes: 1 addition & 2 deletions src/controllers/krate/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
conn.transaction(|conn| {
let name = metadata.name;
let vers = &*metadata.vers;
let links = metadata.links;
let features = metadata
.features
.into_iter()
Expand Down Expand Up @@ -238,7 +237,7 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
content_length as i32,
user.id,
hex_cksum,
links,
package.links,
rust_version,
)?
.save(conn, &verified_email_address)?;
Expand Down
1 change: 0 additions & 1 deletion src/tests/builders/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ impl PublishBuilder {
.map(u::EncodableCategory)
.collect(),
),
links: None,
};

let mut tarball_builder = TarballBuilder::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: response.into_json()
{
"errors": [
{
"detail": "invalid upload request: invalid length 6, expected at most 5 categories per crate at line 1 column 154"
"detail": "invalid upload request: invalid length 6, expected at most 5 categories per crate at line 1 column 155"
}
]
}
2 changes: 0 additions & 2 deletions src/views/krate_publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ pub struct PublishMetadata {
pub keywords: EncodableKeywordList,
#[serde(default)]
pub categories: EncodableCategoryList,
#[serde(default)]
pub links: Option<String>,
}

#[derive(PartialEq, Eq, Hash, Serialize, Clone, Debug, Deref)]
Expand Down