1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 03:02:43 +01:00
phorge-phorge/src/applications/repository/engine
epriestley 972dfa7bfc Add 'hook.d/' directories to SVN and Git repositories for custom hooks
Summary:
Fixes T4189. Ref T4151. Allows repositories to have additional custom hooks for operations which can't be expressed with Herald (one such operation is lint).

This adds only local hook directories, since they're easier to use with existing hooks than global directories. I might add global directories eventually.

This doesn't support Mercurial since we have no demand for it and it's more complicated (we lose compatibility and power by just dropping a `hooks.d/` somewhere).

Test Plan:
  - Pulled hosted SVN and Git repos to verify the hook directories generate correctly.
  - Added a variety of hooks to the hook directories (echo + pass, fail).
  - Pushed commits and verified the hooks fired (output expected info, or failed).
  - Verified push log reflected the correct error code ("3", external) and detail ("nope.sh") when rejecting.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4151, T4189

Differential Revision: https://secure.phabricator.com/D7884
2014-01-03 12:26:10 -08:00
..
__tests__ Fix git "origin" remote in more circumstances 2013-11-20 10:41:56 -08:00
PhabricatorRepositoryCommitRef.php Make repository discovery partially testable 2013-05-12 19:08:37 -07:00
PhabricatorRepositoryDiscoveryEngine.php Fix an issue with SVN path construction in the presence of subpath configuration 2013-11-21 14:41:38 -08:00
PhabricatorRepositoryEngine.php Don't pull updates for repositories marked as hosted 2013-10-29 15:32:41 -07:00
PhabricatorRepositoryPullEngine.php Add 'hook.d/' directories to SVN and Git repositories for custom hooks 2014-01-03 12:26:10 -08:00