Revision history for Git-Hooks. -*- text -*- 0.028 2012-12-25 22:47:34 America/Sao_Paulo CheckLog implements spell checking of log messages. Abort building on Windows. We're not ready yet. Git::More::get_commit_msg now supports pre-1.7.2 Gits. 0.026 2012-12-22 20:23:22 America/Sao_Paulo Implement a new plugin Git::Hooks::CheckLog to enforce formatting policies for git commit log messages. Fix configuration grokking. Recommends JIRA::Client instead of requiring it, as it is only needed for the Git::Hooks::CheckJira plugin. 0.025 2012-12-21 08:06:04 America/Sao_Paulo This version is another big refactoring. It introduces a few incompatible changes as well, for good measure. ;-) * INCOMPATIBLE CHANGES AFFECTING PLUGIN USERS: The CheckJira.by-assignee option previously required the name of an environment variable. But this was duplicating poorly the functionality of the githooks.userenv global option. So, I changed its meaning to now require a boolean (integer). If true it now checks if the authenticated_user (as infered by the githooks.userenv option) is the current issue's assignee. * INCOMPATIBLE CHANGES AFFECTING PLUGIN DEVELOPERS: The Git::Hooks routines grok_affected_refs, get_affected_refs, get_affected_ref_range, get_affected_ref_commit_ids, and get_affected_ref_commits were transformed in Git::More methods, so that they can now keep the affected_refs information inside the objects. The Git::Hooks::grok_userenv routine was transformed into the Git::More::authenticated_user method. The Git::Hooks::git_config routine was tranformed into the Git::More::config method. The method Git::More::get_commits now returns a list of commits and not an array-ref. This makes its usage simpler. * FIXES: The tests are now performed out of the distribution directory. By performing them in the distribution directory we run the risk of messing up with Git::Hooks own git repository, which can interfere with the tests too. * REFACTORINGS: Got rid of global variables in Git::Hooks and all state variables used throughout. This had a great impact in the code, adding arguments to several routines, turning Git::Hooks routines into Git::More methods, adding new methods The tests now prepare only the hooks that will be tested. Earlier we prepared all 16 hooks, which made the testing take longer. The compatibility with old plugin names that was implemented some commits ago was made more specific, affecting just the plugins CheckAcls, CheckJira, and CheckStructure. Those were the plugins that existed before the plugin name change. 0.024 2012-12-17 12:35:52 America/Sao_Paulo Implement a new plugin Git::Hooks::GerritChangeId which is a reimplementation of Gerrit's commit-msg official one (http://tinyurl.com/cglobb4, at Gerrit's v2.5.1). Improve code and documentation with the help of Code::TidyAll, Perl::Critic, Pod::Checker, and Pod::Spell. 0.023 2012-12-16 08:47:55 America/Sao_Paulo This version makes a large refactor in the code. The plugins were rewritten as proper modules so that they can be used by themselves, without the Git::Hooks framework. The only user visible change is that from now on the preferred way to configure plugins is by their CamelCase names (e.g. CheckJira instead of check-jira). But the old flattened names are still valid to keep compatibility with already set up repos. This version starts to require App::gh::Git version 0.56 in order to have a working App::gh::Git. It also starts to require File::Path version 2.08 for the testing phase in order to have a working make_path routine. 0.022 2012-12-06 23:13:44 America/Sao_Paulo Implement a new plugin called check-structure.pl which enforces the repository's file and reference structure. 0.021 2012-12-06 08:52:34 America/Sao_Paulo The configuration variables userenv and admin, which were available in the check-acls and check-jira plugins were promoted to the "githooks" configuration section. Along with them, the functions grok_userenv, match_user, and im_admin were also migrated to the Git::Hooks module so that they can be used by any access control plugin. The old configuration variables in the plugins are still supported but are now documented as deprecated. Also improved the documentation slightly. 0.020 2012-11-20 21:56:51 America/Sao_Paulo Implement routine Git::Hooks::eval_gitconfig to make it easier to grok Perl expressions in config values. Fix some problems in the test infrastructure. 0.019 2012-11-10 23:56:44 America/Sao_Paulo Fix the post-receive hook which now gets the same input as pre-receive. This was reported to me by Mike South. Thanks again! 0.018 2012-11-06 21:49:20 America/Sao_Paulo Fix a bug that prevented installed hooks to be invoked in the absense of any configured plugins. This was reported to me by Mike South. Thanks! 0.017 2012-10-31 10:45:10 America/Sao_Paulo Just a bunch of fixes. 0.016 2012-09-13 22:34:05 America/Sao_Paulo Interpolate environment variables in the whole ACL specification for check-acls. Make the .pl extension optional in configuring plugins. Make im_memberof an exported routine of Git::Hooks. The group specification is now given by the githooks.groups variable. This is an incompatible change, since previously it was given by the check-acls.groups variable. Implement Git::More::get_affected_files. This routine returns a hash mapping every affected file in a sequence of commits to a letter telling its affected status. Allow check-acls.userenv be given by a code snippet to be evaluated. 0.015 2012-08-19 18:20:07 America/Sao_Paulo ACLs in check-acls.pl can have environment variables interpolated in their refs components. 0.014 2012-08-16 23:00:38 America/Sao_Paulo Implement reference specification by negated regexes in ACLs. Clarify semantics of ACLs what component in the documentation. Fix check-jira.matchlog usage. Provide different messages when there are JIRAs cited but not from an expected project. 0.013 2012-07-27 17:11:17 America/Sao_Paulo Require at least git 1.5 to work with. 0.012 2012-07-26 12:11:10 America/Sao_Paulo Improve testing framework. 0.011 2012-07-25 11:12:01 America/Sao_Paulo Improve testing framework. 0.010 2012-07-23 11:25:09 America/Sao_Paulo Check if we have git installed before generating Makefile from Makefile.PL so that we avoid producing bogus cpantesters.org reports. 0.009 2012-07-22 11:21:18 America/Sao_Paulo Show git version upon test failure. 0.008 2012-07-20 17:19:17 America/Sao_Paulo Fix check-acls.pl to detect ref rewrites to non-related commits. 0.007 2012-07-17 08:59:31 America/Sao_Paulo Fix still more errors detected by http://cpantesters.org/distro/G/Git-Hooks.html. 0.006 2012-07-16 17:29:12 America/Sao_Paulo Enable pre 1.7.2 gits by using old-fashioned rev-list --pretty formats. 0.005 2012-07-16 10:17:16 America/Sao_Paulo Fix some errors detected by http://cpantesters.org/distro/G/Git-Hooks.html. 0.004 2012-07-15 22:01:36 America/Sao_Paulo Fix missing required dependency. 0.003 2012-07-15 18:33:20 America/Sao_Paulo Fix dependency on App::gh::Git. 0.002 2012-07-11 America/Sao_Paulo Implement support for driving external hooks. Rename option githooks.hookdir to githooks.plugins. Rename default local plugin directory from .git/hooks.d to .git/githooks. Add option githooks.externals to disable external hooks processing. Add option githooks.hooks to specify extra directories to look for external hooks. 0.001 2012-07-10 America/Sao_Paulo First release, with two hooks passing tests: check-acls.pl and check-jira.pl. I decided to incorporate Git::More in this distribution instead of making it a separate module. The documentation is lacking and the functionality needs to be expanded.