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

Remove teams from publisher ownership list #2257

Merged
merged 2 commits into from
Feb 1, 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
6 changes: 0 additions & 6 deletions tools/ci-build/publisher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ pub const SDK_REPO_CRATE_PATH: &str = "sdk";
pub const SDK_REPO_NAME: &str = "aws-sdk-rust";
pub const SMITHYRS_REPO_NAME: &str = "smithy-rs";

// https://github.com/orgs/awslabs/teams/smithy-rs-server
pub const SMITHY_RS_SERVER_OWNER: &str = "github:awslabs:smithy-rs-server";

// https://github.com/orgs/awslabs/teams/rust-sdk-owners
pub const RUST_SDK_OWNER: &str = "github:awslabs:rust-sdk-owners";

// https://github.com/aws-sdk-rust-ci
pub const RUST_SDK_CI_OWNER: &str = "aws-sdk-rust-ci";

Expand Down
52 changes: 15 additions & 37 deletions tools/ci-build/publisher/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use crate::fs::Fs;
use crate::sort::dependency_order;
use crate::{RUST_SDK_CI_OWNER, RUST_SDK_OWNER, SMITHY_RS_SERVER_OWNER};
use crate::RUST_SDK_CI_OWNER;
use anyhow::{Context, Result};
use cargo_toml::{Dependency, DepsSet, Manifest};
use semver::Version;
Expand Down Expand Up @@ -95,23 +95,11 @@ impl Package {
}

/// Returns the expected owners of the crate.
pub fn expected_package_owners(category: &PackageCategory, package_name: &str) -> HashSet<String> {
let mut ret = HashSet::new();

// Crate ownership for SDK crates. Crates.io requires that at least one owner
// is an individual rather than a team, so we use the automation user for that.
ret.insert(String::from(RUST_SDK_CI_OWNER));

if category.is_sdk() {
ret.insert(String::from(RUST_SDK_OWNER));
} else if package_name.starts_with("aws-smithy-http-server") {
ret.insert(String::from(SMITHY_RS_SERVER_OWNER));
} else {
ret.insert(String::from(RUST_SDK_OWNER));
ret.insert(String::from(SMITHY_RS_SERVER_OWNER));
}

ret
pub fn expected_package_owners(
_category: &PackageCategory,
_package_name: &str,
) -> HashSet<String> {
[RUST_SDK_CI_OWNER.to_string()].into_iter().collect()
}

/// Batch of packages.
Expand Down Expand Up @@ -536,12 +524,9 @@ mod tests {
];
for pkg in server_packages {
assert_eq!(
[
String::from("github:awslabs:smithy-rs-server"),
String::from("aws-sdk-rust-ci")
]
.into_iter()
.collect::<HashSet<String>>(),
[String::from("aws-sdk-rust-ci")]
.into_iter()
.collect::<HashSet<String>>(),
pkg.expected_owners()
);
}
Expand All @@ -551,12 +536,9 @@ mod tests {
fn test_expected_package_owners_sdk_crate() {
let sdk_package = package("aws-types", &[]);
assert_eq!(
[
String::from("github:awslabs:rust-sdk-owners"),
String::from("aws-sdk-rust-ci")
]
.into_iter()
.collect::<HashSet<String>>(),
[String::from("aws-sdk-rust-ci")]
.into_iter()
.collect::<HashSet<String>>(),
sdk_package.expected_owners()
);
}
Expand All @@ -565,13 +547,9 @@ mod tests {
fn test_expected_package_owners_smithy_runtime_crate() {
let smithy_runtime_package = package("aws-smithy-types", &[]);
assert_eq!(
[
String::from("github:awslabs:smithy-rs-server"),
String::from("github:awslabs:rust-sdk-owners"),
String::from("aws-sdk-rust-ci")
]
.into_iter()
.collect::<HashSet<String>>(),
[String::from("aws-sdk-rust-ci")]
.into_iter()
.collect::<HashSet<String>>(),
smithy_runtime_package.expected_owners()
);
}
Expand Down