feat: implement ruleset bypass actor#2199
feat: implement ruleset bypass actor#2199amustaque97 wants to merge 6 commits intorust-lang:mainfrom
Conversation
Dry-run check results |
29a954f to
023b6b5
Compare
| source_type: RulesetSourceType::Repository, | ||
| enforcement: RulesetEnforcement::Active, | ||
| bypass_actors: None, | ||
| bypass_actors: None, // Will be populated when applying the diff |
There was a problem hiding this comment.
We can discuss if this needs to be changed. I can think of making ID resolution methods available on the read client.
I'm okay with this comment because the current implementation is read-only
e1c1ba6 to
0330575
Compare
marcoieni
left a comment
There was a problem hiding this comment.
Can you edit a toml file that can take advantage of this so that we can test this PR later? (I still need to review it before testing it)
We don't have to do it for time being until this is stable enough as we've added an undocumented config https://github.com/rust-lang/team/blob/main/config.toml#L84-L86 So it will read the values from Yes we need to test it as i was not able to setup and test bots or allowed-merge-teams 😅 |
| for team_name in &branch_protection.allowed_merge_teams { | ||
| match github_write.resolve_team_database_id(org, team_name) { | ||
| Ok(Some(actor_id)) => { | ||
| bypass_actors.push(api::RulesetBypassActor { |
| continue; | ||
| } | ||
| }; | ||
| match github_write.resolve_user_database_id(user_login, org) { |
There was a problem hiding this comment.

Closes: #2192