]> git.proxmox.com Git - cargo.git/commit
Auto merge of #4551 - natboehm:owner-invite-messages, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 30 Sep 2017 07:37:59 +0000 (07:37 +0000)
committerbors <bors@rust-lang.org>
Sat, 30 Sep 2017 07:37:59 +0000 (07:37 +0000)
commitff9ca41fe754f94320ebe69acf4f44842edde3e4
treed04820da23d12d3b4ae45723517b44d544354e1c
parent7da5c847776913c3a499d62753903b9ae8451639
parent8150b602ba8a90832d2dbb00545163b3efd064be
Auto merge of #4551 - natboehm:owner-invite-messages, r=alexcrichton

Owner invite messages

This PR addresses issue #4537, the plan for `cargo owner --add` requiring invitations in Cargo and the encompassing issue [#924](https://github.com/rust-lang/crates.io/issues/924), requiring an invite to add someone as an owner in Crates.io.

Regarding the Cargo issue, we went with Option 2, changing the `add_owners` function to decode a struct sent from Crates containing a `boolean` and `String`, the `boolean` being the response status and `String` being the success message. This may sound redundant however we concluded that using both of these fields were necessary to support older versions of Cargo - if we changed Crates.io to only return the `String` message on success this would likely break systems using the older version of `add_owner` expecting a response containing a `boolean`. Matching this schema, `add_owners` on the Crates.io side will soon return a struct containing a `boolean` and `String`, and instead of adding a new crate owner to the database will add a crate owner invite. If successful, `modify_owners` now prints the message sent from Crates.io instead of the old hardcoded message.

Resolves #4537