-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Create CI task to fail PR if merge commit exists #12259
Comments
We need to recheck why our commit message validation is not catching this. |
checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/internal/CommitValidationTest.java Line 260 in 70bbcd8
checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/internal/CommitValidationTest.java Line 372 in 70bbcd8
Merge commits will fail CI as travis always works as a merge commit even if there is none in PR. |
Sounds like shell script is the best way to handle this case then. |
What is we made update in code and allow skip of merged only if some system variable is defined. And set it in Travis. All others will run without allowance of merge commit. |
I remember we had issues with different CIs and looking at git history similar to PR view. Travis was just the one I remember clearly. |
At time we created this Junit validation Travis probably was the only CI we had. |
I am on it |
Noticed at #12256 (comment), even though we have a bunch of checks in place for commit message, stale PR branch, etc., we do not fail CI for merge commits in PR branches.
I see github action https://github.com/greenled/no-merge-commits-check, maybe we can re-use the script in this repo and create a CI task to fail build if merge commits exist, and provide a message with link to https://checkstyle.org/beginning_development.html#Starting_Development .
The text was updated successfully, but these errors were encountered: