Skip to content

Conversation

@mubbi
Copy link
Owner

@mubbi mubbi commented Jul 28, 2025

This pull request introduces a comprehensive setup for a Laravel package, "Laravel Commit Lint," which enforces Conventional Commits via Git hooks and CI workflows. The changes include documentation, Git hooks, CI/CD workflows, and package configuration files. Below is a summary of the most important changes grouped by theme:

Documentation and Guidelines

  • Added a detailed README.md explaining the package's purpose, features, installation, usage, and troubleshooting. It includes examples of valid and invalid commit messages and instructions for customization.
  • Created a CONTRIBUTING.md file with guidelines for contributing, including prerequisites, commit message format, and development setup.
  • Added a SECURITY.md file outlining the security policy, including how to report vulnerabilities and supported versions.

Git Hooks

  • Introduced a commit-msg hook to enforce Conventional Commits by validating commit messages against a regex pattern. It provides clear feedback for invalid messages and skips special commit types like merge, WIP, and revert.
  • Added a pre-push hook to run PHPUnit tests and enforce a minimum code coverage threshold of 80%. Pushes are blocked if the threshold is not met.

Continuous Integration (CI) and Release Management

  • Added a ci.yml workflow to validate commit messages and run PHPUnit tests on push and pull requests. It includes automated PR comments for validation results.
  • Added a release-please.yml workflow for automated release management using the Release Please GitHub Action.
  • Introduced a .release-please-manifest.json file to track the current version for release automation.

Package Configuration

  • Updated composer.json to define package metadata, dependencies, and autoload configuration. It includes support for Laravel service providers and PHPUnit for testing.
  • Added a phpunit.xml configuration file for PHPUnit, including coverage reporting in Clover and HTML formats.

Changelog

  • Created an initial CHANGELOG.md to document notable changes, starting with the initial release.

@github-actions
Copy link

✅ Commit Message Validation Passed

All commit messages in this pull request follow the Conventional Commits format. Great work! 🎉

Validated using the shell script (src/Hooks/commit-msg) for consistency with local git hooks.

@mubbi mubbi merged commit 251d824 into main Jul 28, 2025
2 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