Repository navigation
crate_owner_invitation: Accept crate name or ID in PUT /api/v1/me/crate_owner_invitations/{crate_id} - #15012
Open
eth3lbert wants to merge 3 commits into
Open
crate_owner_invitation: Accept crate name or ID in PUT /api/v1/me/crate_owner_invitations/{crate_id}#15012eth3lbert wants to merge 3 commits into
PUT /api/v1/me/crate_owner_invitations/{crate_id}#15012eth3lbert wants to merge 3 commits into
Conversation
…ate_owner_invitations/{crate_id}`
Previously, `PUT /api/v1/me/crate_owner_invitations/{crate_id}` only
accepted an opaque crate identifier. However, most endpoints only
returned crate name as `crate_id`, making this public API somewhat
unusable for others. This change allow the endpoint to accept either a
crate name or ID as `crate_id`. This makes the public API easier to use
while preserving backward compatibility with callers that pass ID.
eth3lbert
force-pushed
the
invitation-accept-crate-name
branch
from
October 19, 2026 16:55
f5a5d55 to
6b560b4
Compare
…me/crate_owner_invitations/{crate_id}`
Reject requests when the `crate_id` in the path does not match the
`crate_id` in the request body.
eth3lbert
force-pushed
the
invitation-accept-crate-name
branch
from
October 19, 2026 17:04
6b560b4 to
5d56add
Compare
…_owner_invitations/{crate_id}`
This reject requests with invalid names such as those containing null
bytes before the database lookup. This prevents PostgreSQL errors from
surfacing as 500 responses and returns a 404 Not Found instead.
eth3lbert
force-pushed
the
invitation-accept-crate-name
branch
from
October 19, 2026 17:19
5d56add to
3e40b65
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per #14897 (comment).
Previously,
PUT /api/v1/me/crate_owner_invitations/{crate_id}only accepted an opaque crate identifier. However, most endpoints only returned crate name ascrate_id, making this public API somewhat unusable for others. This change allow the endpoint to accept either a crate name or ID ascrate_id. This makes the public API easier to use while preserving backward compatibility with callers that pass ID.Related: https://rust-lang.zulipchat.com/#narrow/channel/318791-t-crates-io/topic/Accept.20pending.20invitations.20API/with/629562558