@@ -679,7 +679,6 @@ impl SyncGitHub {
679679 dismiss_stale_review : false ,
680680 mode : rust_team_data:: v1:: BranchProtectionMode :: PrNotRequired ,
681681 allowed_merge_teams : vec ! [ ] ,
682- allowed_merge_users : vec ! [ ] ,
683682 merge_bots : vec ! [ ] ,
684683 } ,
685684 } ) ;
@@ -717,13 +716,8 @@ impl SyncGitHub {
717716 actual_ruleset : & api:: Ruleset ,
718717 branch_protection : & rust_team_data:: v1:: BranchProtection ,
719718 ) -> bool {
720- let expected_count = branch_protection. allowed_merge_teams . len ( )
721- + if branch_protection. allowed_merge_users . is_empty ( ) {
722- 0
723- } else {
724- 1
725- } // OrganizationAdmin counts as 1
726- + branch_protection. merge_bots . len ( ) ;
719+ let expected_count =
720+ branch_protection. allowed_merge_teams . len ( ) + branch_protection. merge_bots . len ( ) ;
727721
728722 let actual_count = actual_ruleset
729723 . bypass_actors
@@ -1008,24 +1002,6 @@ pub(crate) fn construct_bypass_actors(
10081002 }
10091003 }
10101004
1011- // Add OrganizationAdmin bypass actor if allowed_merge_users is specified.
1012- // Note: GitHub API limitation - cannot add individual users as bypass actors.
1013- // OrganizationAdmin with actor_id=1 grants bypass to ALL organization admins.
1014- // For granular per-user control, use allowed_merge_teams with a team containing specific users.
1015- if !branch_protection. allowed_merge_users . is_empty ( ) {
1016- debug ! (
1017- "Using OrganizationAdmin bypass actor for allowed_merge_users: {:?}. \
1018- Note: This grants bypass to ALL org admins, not just specified users. \
1019- For per-user control, use allowed_merge_teams instead.",
1020- branch_protection. allowed_merge_users
1021- ) ;
1022- bypass_actors. push ( api:: RulesetBypassActor {
1023- actor_id : Some ( api:: ActorId :: Id ( 1 ) ) ,
1024- actor_type : api:: RulesetActorType :: OrganizationAdmin ,
1025- bypass_mode : Some ( api:: RulesetBypassMode :: Always ) ,
1026- } ) ;
1027- }
1028-
10291005 // Resolve bot integration bypass actors
10301006 for merge_bot in & branch_protection. merge_bots {
10311007 let user_login = match merge_bot {
@@ -1989,24 +1965,14 @@ fn log_ruleset(
19891965
19901966 // Log expected bypass actors if branch protection config is provided
19911967 if let Some ( bp) = branch_protection
1992- && ( !bp. allowed_merge_teams . is_empty ( )
1993- || !bp. allowed_merge_users . is_empty ( )
1994- || !bp. merge_bots . is_empty ( ) )
1968+ && ( !bp. allowed_merge_teams . is_empty ( ) || !bp. merge_bots . is_empty ( ) )
19951969 {
19961970 writeln ! ( result, " Expected Bypass Actors:" ) ?;
19971971
19981972 for team in & bp. allowed_merge_teams {
19991973 writeln ! ( result, " - Team: {} (Mode: always)" , team) ?;
20001974 }
20011975
2002- if !bp. allowed_merge_users . is_empty ( ) {
2003- writeln ! (
2004- result,
2005- " - OrganizationAdmin: ID=1 (Mode: always) [Note: Grants bypass to all org admins, requested users: {}]" ,
2006- bp. allowed_merge_users. join( ", " )
2007- ) ?;
2008- }
2009-
20101976 for bot in & bp. merge_bots {
20111977 let bot_name = match bot {
20121978 MergeBot :: Homu => "bors" ,
0 commit comments