Skip to content

Refactor no_merges handler into the check_commits super-handler #1936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2025

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Apr 15, 2025

This PR refactors the no_merges handler into the check_commits super-handler.

In the process I introduced to the check_commits super-handler:

  • handling of labels (add & remove)
  • handling of draft/rollup PRs

Step 3-ish of the plan in #1901 (comment)

no_merges is now ridiculously simple and short compared to before. Our efforts are paying of big!

@Urgau
Copy link
Member Author

Urgau commented Apr 15, 2025

The warning will look like this.


  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/{repository_name}.git {default_branch}
    $ git push --force-with-lease
    

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Nice! Do you think you could write a simple test for this please? 😇

@Urgau Urgau force-pushed the no_merges-refactor branch 2 times, most recently from eb878b0 to 8bca1a0 Compare April 16, 2025 16:53
@Urgau Urgau force-pushed the no_merges-refactor branch from 8bca1a0 to 38c7a26 Compare April 16, 2025 19:49
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@Kobzol Kobzol added this pull request to the merge queue Apr 16, 2025
Merged via the queue into rust-lang:master with commit 3c31528 Apr 16, 2025
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.

2 participants