Skip to content
Draft
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
12 changes: 4 additions & 8 deletions rust_team_data/src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,21 +334,17 @@ pub enum BranchProtectionMode {
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum MergeBot {
Homu,
RustTimer,
Bors,
WorkflowsCratesIo,
PromoteRelease,
}

impl MergeBot {
pub fn app_id(&self) -> Option<i64> {
pub fn app_id(&self) -> i64 {
match self {
MergeBot::WorkflowsCratesIo => Some(2201425),
MergeBot::Bors => Some(278306),
MergeBot::PromoteRelease => Some(217112),
// These are user-based bots, not GitHub Apps
MergeBot::RustTimer | MergeBot::Homu => None,
MergeBot::WorkflowsCratesIo => 2201425,
MergeBot::Bors => 278306,
MergeBot::PromoteRelease => 217112,
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,6 @@ pub(crate) enum RepoPermission {
#[derive(serde::Deserialize, Debug, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
pub(crate) enum BypassApp {
RustTimer,
Bors,
WorkflowsCratesIo,
PromoteRelease,
Expand Down
1 change: 0 additions & 1 deletion src/static_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ impl<'a> Generator<'a> {
fn convert_bypass_apps(apps: &[BypassApp]) -> Vec<v1::MergeBot> {
apps.iter()
.map(|app| match app {
BypassApp::RustTimer => v1::MergeBot::RustTimer,
BypassApp::Bors => v1::MergeBot::Bors,
BypassApp::WorkflowsCratesIo => v1::MergeBot::WorkflowsCratesIo,
BypassApp::PromoteRelease => v1::MergeBot::PromoteRelease,
Expand Down
11 changes: 6 additions & 5 deletions src/sync/github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,14 @@ impl SyncGitHub {
.allowed_merge_teams(expected_repo, branch_protection)
.await?;
bypass_actors.extend(allowed_teams);
let bypass_apps = branch_protection.bypass_apps.iter().filter_map(|app| {
app.app_id().map(|app_id| RulesetBypassActor {
actor_id: app_id,
let bypass_apps = branch_protection
.bypass_apps
.iter()
.map(|app| RulesetBypassActor {
actor_id: app.app_id(),
actor_type: RulesetActorType::Integration,
bypass_mode: RulesetBypassMode::Always,
})
});
});
bypass_actors.extend(bypass_apps);
Ok(bypass_actors)
}
Expand Down
11 changes: 0 additions & 11 deletions teams/rust-timer.toml

This file was deleted.

Loading