This project is not covered by Drupal’s security advisory policy.
Git Hook is a project to facilitate building git event workflows with Drush.
Did you know that Git has its own hook/event system? Certain git actions will result git checking for a script in your local git repository in .git/hooks, and if an executable exists with the correct name, it will execute it. Some of those events will even act as validation before allowing an action to proceed.
This allows you to develop workflows around your git operations, such as basic code validation, or firing off emails when a branch is tagged.
GitHook wraps the hook system in a Drush-based command-line environment in an effort to make the creation of custom workflows easier for Drupal developers.
Current Functionality
- Validate PHP Syntax for all changed files in a commit. Will not allow a commit to be made with syntax errors. (Thanks to Travis Swicegood for the original script!)
Why Drush?
Drush is a rich framework for building command-line tools. It uses patterns familiar to the Drupal developer community, making development more accessible to a larger audience. It also allows leveraging other Drush commands, which might be very cool. If Drush is not your cup of tea but you are still fascinated by git hooks and PHP, you might check out the initial proof-of-concept work I posted to github.
Installation
- Download Git Hook!
- Navigate to a Git Repository.
- Enter
$> drush githook --install
Uninstallation
If you no longer want to use Drush with a particular repository, it's easy to uninstall!
- Navigate to a Git repository.
- Enter
$> drush githook --uninstall
Project information
- Project categories: Developer tools
- Created by Grayside on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.