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

Add yank_message field to API version responses #9437

Merged
merged 1 commit into from
Sep 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo/1.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo/1.0.0/readme",
"rust_version": "1.69",
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo/1.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_show/1.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
},
{
Expand Down Expand Up @@ -103,6 +104,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_show/0.5.1/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
},
{
Expand Down Expand Up @@ -135,6 +137,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_show/0.5.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c3/1.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c2/1.1.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c3/3.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
},
{
Expand All @@ -89,6 +90,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c2/2.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c2/1.0.18446744073709551615/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c2/2.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/c2/2.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_versions/1.0.0/readme",
"rust_version": "1.64",
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
},
{
Expand Down Expand Up @@ -60,6 +61,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_versions/0.5.1/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
},
{
Expand Down Expand Up @@ -92,6 +94,7 @@ expression: response.json()
"readme_path": "/api/v1/crates/foo_versions/0.5.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ expression: json
"readme_path": "/api/v1/crates/foo_vers_show_no_pb/1.0.0/readme",
"rust_version": null,
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ expression: json
"readme_path": "/api/v1/crates/foo_vers_show/2.0.0/readme",
"rust_version": "1.64",
"updated_at": "[datetime]",
"yank_message": null,
"yanked": false
}
}
4 changes: 4 additions & 0 deletions src/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ pub struct EncodableVersion {
pub downloads: i32,
pub features: serde_json::Value,
pub yanked: bool,
pub yank_message: Option<String>,
pub lib_links: Option<String>,
// NOTE: Used by shields.io, altering `license` requires a PR with shields.io
pub license: Option<String>,
Expand Down Expand Up @@ -586,6 +587,7 @@ impl EncodableVersion {
downloads,
features,
yanked,
yank_message,
links: lib_links,
license,
crate_size,
Expand Down Expand Up @@ -613,6 +615,7 @@ impl EncodableVersion {
downloads,
features,
yanked,
yank_message,
lib_links,
license,
links,
Expand Down Expand Up @@ -736,6 +739,7 @@ mod tests {
downloads: 0,
features: serde_json::from_str("{}").unwrap(),
yanked: false,
yank_message: None,
license: None,
lib_links: None,
links: EncodableVersionLinks {
Expand Down