-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[12.x] feat(git): add semantic commits script and action for commit standard enforcement #56443
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
Conversation
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
commitlint / Validate Commit Messages (using Shell Script) (pull_request) is failling due to repo access for writing the comment. while the commit linting worked fine. Also someone needs to review and decide from when to enforce this github action because this action will fail for some current pending PRs and commits by other devs. |
Thanks for the PR, but we don't use semantic commit conventions - this can be observed by looking over the recent commit history. Candidly, this also seems like a waste of CO2 emissions to run this code on every PR. |
Thanks for the feedback! You’re right that the current commit history doesn’t follow semantic conventions—but I believe that’s exactly why this PR could help. Semantic commits are becoming a global standard, and they provide long-term benefits like: This GitHub Action itself is lightweight (takes just 5–10 seconds) and only runs on PRs, so the CI impact is minimal. It enforces consistency without adding significant overhead. Of course, if the team prefers not to go this route, I totally understand and can close the PR. Just wanted to propose this as a small improvement that could support scalability and collaboration in the long run. Happy to adjust based on what the team decides. |
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions! |
Thanks for the feedback! Totally understand the need to keep the framework lean and maintainable. To make this functionality available to the community, I've published it as a standalone Laravel package: laravel-commit-lint. Hope it’s helpful to others! Feedback and contributions are welcome. |
This pull request introduces a new script and GitHub Actions workflow to validate commit messages for adherence to the Conventional Commits format. The workflow ensures consistency in commit messages across pull requests and pushes, providing feedback directly in the pull request when validation fails.
New GitHub Actions Workflow for Commit Message Validation:
Workflow Definition (
.github/workflows/commitlint.yml
):commitlint
workflow triggered on pull requests and pushes to specific branches (12.x
,*.x
, andmaster
).bin/commitlint.sh
) for both pull requests and the latest commit on pushes.Merge
,WIP
, orRevert
).Pull Request Feedback:
Error Handling and Cleanup:
Link to commitlint guide doc Pull Request: laravel/docs#10646