Skip to content
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
2 changes: 0 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,3 @@ members-without-zulip-id = [
"abibroom",
"rust-timer",
]

disable-rulesets-repos = []
1 change: 0 additions & 1 deletion src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ impl Data {
Ok(sync::Config {
special_org_members,
independent_github_orgs: self.config.independent_github_orgs().clone(),
disable_rulesets_repos: self.config.disable_rulesets_repos().clone(),
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub(crate) struct Config {
// Use a BTreeSet for consistent ordering in tests
special_org_members: BTreeSet<String>,
members_without_zulip_id: BTreeSet<String>,
#[serde(default)]
disable_rulesets_repos: BTreeSet<String>,
}

impl Config {
Expand Down Expand Up @@ -48,10 +46,6 @@ impl Config {
pub(crate) fn members_without_zulip_id(&self) -> &BTreeSet<String> {
&self.members_without_zulip_id
}

pub(crate) fn disable_rulesets_repos(&self) -> &BTreeSet<String> {
&self.disable_rulesets_repos
}
}

// This is an enum to allow two kinds of values for the email field:
Expand Down
6 changes: 3 additions & 3 deletions src/sync/github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ impl SyncGitHub {
}

/// Check if a repository should use rulesets instead of branch protections
fn should_use_rulesets(&self, repo: &rust_team_data::v1::Repo) -> bool {
let repo_full_name = format!("{}/{}", repo.org, repo.name);
!self.config.disable_rulesets_repos.contains(&repo_full_name)
fn should_use_rulesets(&self, _repo: &rust_team_data::v1::Repo) -> bool {
// TODO delete this function in the future since we don't need it anymore
true
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept this function to minimize the size of this PR


async fn construct_ruleset(
Expand Down
1 change: 0 additions & 1 deletion src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use zulip::SyncZulip;
pub struct Config {
pub special_org_members: BTreeSet<String>,
pub independent_github_orgs: BTreeSet<String>,
pub disable_rulesets_repos: BTreeSet<String>,
}

pub async fn run_sync_team(
Expand Down