Skip to content

Conversation

@amustaque97
Copy link
Contributor

@amustaque97 amustaque97 commented Dec 23, 2025

Closes #2197

Summary

This PR configures repository rulesets only to accept CI status checks from GitHub Actions by setting the integration_id to 15368.

Changes

  • Added GITHUB_ACTIONS_INTEGRATION_ID constant (value: 15368) with verification link
  • Updated construct_ruleset() to use the GitHub Actions integration ID for required status checks

Verification

The integration ID was verified via the public GitHub API:

curl -s https://api.github.com/repos/rust-lang/rust/commits/HEAD/check-runs | grep -A 3 '"app"'

@github-actions
Copy link

github-actions bot commented Dec 23, 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

@marcoieni
Copy link
Member

Thanks!
One small thing. The dry run in #2201 doesn't show the content of the diff. Can you fix it? 🙏

writeln!(result, " Checks:")?;
for check in &parameters.required_status_checks {
if let Some(integration_id) = check.integration_id {
let app_name = if integration_id == GITHUB_ACTIONS_INTEGRATION_ID {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now it should show something like below

        Rule: Required Status Checks
          Strict Policy: false
          Checks:
            - CI (GitHub Actions, integration_id: 15368)
            - test (GitHub Actions, integration_id: 15368)

}

if !is_create && !logged {
writeln!(result, " No changes")?;
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 made a change here. I do remember I need to convert the macro into a general function. I will take it up in a separate PR. In this PR, I'm adding a check for a clear description. If there are no changes, it must print.

Ruleset for main
        No changes

instead of just printing

Ruleset for main

@amustaque97 amustaque97 force-pushed the fix/2197-status-check branch from 5a89739 to ff7c6b1 Compare December 23, 2025 16:42
@marcoieni
Copy link
Member

From the latest 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
          Branch protection for main
            Deleting ruleset

I see a few problems:

  1. It mentions "Branch protection for main" but currently the bors repo has no branch protection configured, maybe it should also be "rulesets"?
  2. Is it normal that we are deleting and recreating the entire ruleset instead of just patching it (ie changing just the status checks)?

@amustaque97
Copy link
Contributor Author

It mentions "Branch protection for main" but currently the bors repo has no branch protection configured, maybe it should also be "rulesets"?

This was the name of the ruleset 🤦🏻 , it will be deleted, and a new and correct name will be given as shown in the dry run.
image

Is it normal that we are deleting and recreating the entire ruleset instead of just patching it (ie changing just the status checks)?

No, this is not ideal. The current logic matches rulesets by name, so when the name format changed from "Branch protection for main" to "Ruleset for main", it can't find a match and ends up deleting + recreating instead of updating.

Also, I'm creating a new improvement issue to tackle this

marcoieni
marcoieni previously approved these changes Jan 6, 2026
@marcoieni
Copy link
Member

github is having issues so I can't merge
image

@amustaque97
Copy link
Contributor Author

I rebased my PR w.r.t main, so it shouldn't be a problem merging it ✅

@marcoieni marcoieni added this pull request to the merge queue Jan 6, 2026
Merged via the queue into rust-lang:main with commit d7bef69 Jan 6, 2026
3 checks passed
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.

In rulesets, set the source of the checks to GitHub Actions

2 participants