Skip to content

Conversation

@amustaque97
Copy link
Contributor

Closes #2211

Summary
Improves ruleset diffing to match by branch pattern instead of name (enabling in-place updates rather than delete/recreate)

@amustaque97 amustaque97 force-pushed the fix-2211-ruleset-diff branch from dc38f6a to 1ca19d0 Compare January 6, 2026 17:12
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

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:
          Ruleset for main
            No changes

@amustaque97 amustaque97 force-pushed the fix-2211-ruleset-diff branch from 1ca19d0 to adac3d3 Compare January 7, 2026 03:52
@amustaque97 amustaque97 marked this pull request as ready for review January 7, 2026 04:01
@jieyouxu jieyouxu added needs-infra-admin-review This change requires one of the `infra-admins` to review. S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin. labels Jan 15, 2026
@marcoieni
Copy link
Member

looks good. I did a few small changes. Testing in #2232
if the dry run works, I will squash and merge 👍

Copy link
Contributor

@ubiratansoares ubiratansoares left a comment

Choose a reason for hiding this comment

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

Side note from my side : perhaps we could have a follow-up PR to add some snapshot tests covering common scenarios around rulesets, eventually having #2211 as test case too 🙂

@marcoieni
Copy link
Member

Ahmed, this is the diff of the dry run:

📝 Editing repo 'rust-lang/bors':
      Rulesets:
          Ruleset for main
            Target: Branch
            Source Type: Repository
            Enforcement: Active
            Include Branches: ["refs/heads/main"]
            Rule: Pull Request
              Dismiss Stale Reviews: false
              Require Code Owner Review: false
              Require Last Push Approval: false
              Required Approving Review Count: 0
              Required Review Thread Resolution: false
            Rule: Required Status Checks
              Strict Policy: false
              Checks:
                - Test (GitHub Actions, integration_id: 15368)
                - Test Docker (GitHub Actions, integration_id: 15368)
            Rule: Merge Queue
              Timeout: 360 minutes
              Grouping Strategy: Allgreen
              Merge Method: Merge
              Max Entries to Build: 5
              Max Entries to Merge: 5
              Min Entries to Merge: 0
              Min Wait Time: 0 minutes
          Ruleset for main
            Deleting ruleset

It looks very verbose. Also, is it normal that it is deleting the ruleset and recreating it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-infra-admin-review This change requires one of the `infra-admins` to review. S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect ruleset diff based on the branch pattern

4 participants