Conversation
| fn should_use_rulesets(&self, repo: &rust_team_data::v1::Repo) -> bool { | ||
| let repo_full_name = format!("{}/{}", repo.org, repo.name); | ||
| self.config.enable_rulesets_repos.contains(&repo_full_name) | ||
| !self.config.disable_rulesets_repos.contains(&repo_full_name) |
There was a problem hiding this comment.
here is where the logic changes
6e2a394 to
1c14446
Compare
src/sync/github/mod.rs
Outdated
| settings_diff: (RepoSettings, RepoSettings), | ||
| permission_diffs: Vec<RepoPermissionAssignmentDiff>, | ||
| branch_protection_diffs: Vec<BranchProtectionDiff>, | ||
| branch_protection_diffs: BTreeSet<BranchProtectionDiff>, |
There was a problem hiding this comment.
I had to change to a BTreeSet because the tests was flaky. Instead, a fixed order fixed it.
This change requires the additional derives you see in the PR
There was a problem hiding this comment.
This is fishy, Vec is ordered too. Using sorting based on some custom comparison, rather than on insertion order, seems like it hides a different bug. Maybe some of the input collections iterated in diff_branch_protections do not have a stable order?
There was a problem hiding this comment.
I think I addressed this comment, let me know
EDIT: I saw you upvoted my other change 👍
e61410a to
d5c139f
Compare
Dry-run check results |
d5c139f to
3a00c5e
Compare
| org: &str, | ||
| repo: &str, | ||
| ) -> anyhow::Result<HashMap<String, (String, BranchProtection)>>; | ||
| ) -> anyhow::Result<BTreeMap<String, (String, BranchProtection)>>; |
There was a problem hiding this comment.
changed this so that we order the branch protections when we read them from GitHub
8bf5956 to
b9c2e85
Compare
7d79b94 to
4913044
Compare
Switch from an allow approach to a deny approach.