Skip to content

Conversation

@amustaque97
Copy link
Contributor

Closes: #2192

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

Dry-run check results

[WARN  sync_team] sync-team is running in dry mode, no changes will be applied.
[INFO  sync_team] synchronizing crates-io
[INFO  sync_team] synchronizing github
[INFO  sync_team] 💻 Repo Diffs:
    📝 Editing repo 'rust-lang/bors':
      Rulesets:
          Branch protection for main

@amustaque97 amustaque97 force-pushed the feat/2192-implement-ruleset-bypass-actors branch from aa4aaa5 to 29a954f Compare December 22, 2025 18:39
@amustaque97 amustaque97 force-pushed the feat/2192-implement-ruleset-bypass-actors branch from 29a954f to 023b6b5 Compare December 22, 2025 18:45
source_type: RulesetSourceType::Repository,
enforcement: RulesetEnforcement::Active,
bypass_actors: None,
bypass_actors: None, // Will be populated when applying the diff
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

}

/// Custom deserializer for actor_id that distinguishes between null and missing
fn deserialize_actor_id<'de, D>(deserializer: D) -> Result<Option<ActorId>, D::Error>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this can be written better. I would love to learn. This is generated code but it works. Here is the video reference.

https://github.com/user-attachments/assets/e5ee56f5-4d83-4312-8cb5-a42c42fd82d4
https://github.com/user-attachments/assets/b16f1d52-746b-4afa-9217-7b2a49720f90

Copy link
Member

@marcoieni marcoieni Dec 23, 2025

Choose a reason for hiding this comment

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

Maybe we can simplify things by only implementing what we need.
For example, we only need to allow github apps and github teams for now I think.
For the crates-io repo we only need github apps for sure.
We don't use deploy keys anywhere if I remember correctly. So we don't need to implement them.
I think we should have a pragmatic approach where we implement stuff only when we find we use it in some repos 👍
Maybe I should have catch this earlier so that you saved time implementing this. If that's the case, sorry! D:

@amustaque97 amustaque97 marked this pull request as ready for review December 23, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement bypass actors for rulesets based on allowed_merge_teams and merge_bots

2 participants