Skip to content

Extract non-default-branch and modifies-submodules warnings out of the assign handler #1922

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 2 commits into from
Apr 4, 2025

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Apr 2, 2025

This PR is the first step of #1901 (comment)

It extracts non-default-branch and modifies-submodules warnings out of the assign handler and creates a check_commits handler.

r? @Kobzol

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.

Thank you! Looks good, left a few nits.

let mut warnings = Vec::new();

if let Some(assign_config) = &config.assign {
// For legacy reasons the non-default-branch and modifies-submodule warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to eventually introduce a [check_commits] config option, but that doesn't need to happen in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, I think it make sense to have a [check_commits] config for new warnings.

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.

Thanks! I tried it on my test repo and it seems to work fine. I will try to implement some end-to-end tests for this later, as it looks rather simple.

@Urgau Urgau force-pushed the extract-out-of-assign branch from 808c8c2 to 4c602da Compare April 4, 2025 15:47
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.

Great, thank you!

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