summaryrefslogtreecommitdiff
path: root/hooks
Commit message (Collapse)AuthorAgeFilesLines
* Remove hooks, they belong to Gitaly nowJacob Vosmaer2019-04-033-69/+9
|
* Use 'push_options' everywhere instead of 'push_opts'Jonathon Reinhart2018-12-131-2/+2
|
* Pass push options to GitLab /internal/post_receive APIJonathon Reinhart2018-12-131-1/+4
| | | | | | | | | | push_opts[] is named as such so that it becomes an array in the GitLab internal Grape::API params hash. If it were named push_opts, only the final (scalar) push_opts parameter would be present. Also update specs to include push_opts parameter: - gitlab_post_receive_spec - gitlab_net_spec for the internal API change
* Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"Nick Thomas2018-08-143-8/+8
| | | | | This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
* Use gl_id instead of key_idAsh McKenzie2018-08-013-8/+8
| | | | | - Is possible that gl_id could be a 'user_id' - Is a more accurate variable name
* Fix a NoMethodError in the pre-receive hookNick Thomas2018-06-121-1/+1
|
* Don't delete GL_REPOSITORYBen2018-02-241-1/+1
|
* Update rubocop and code to pass itDmitriy Zaporozhets2018-02-221-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix git push by removing a bad require in the pre-receive hookNick Thomas2018-01-141-1/+0
|
* Remove direct redis integrationNick Thomas2018-01-121-2/+0
|
* pre-receive: Fix undefined local variable errorJonathon Reinhart2017-09-211-2/+2
| | | | This was broken during the refactor in c658360e94.
* Support new /internal/pre-receive API endpoint for post-receivegitaly-redis-refactorAlejandro Rodríguez2017-09-051-1/+10
|
* Revert "Merge branch 'sh-disable-rubygems' into 'master'"Stan Hu2017-07-053-3/+3
| | | | | This reverts commit a18c90128e4d3eeae1233b1bc3c3998afd223c0d, reversing changes made to 0a64624152735766c428d1532e434dd0bf5a9748.
* Disable Rubygems in hooks toosh-disable-rubygemsStan Hu2017-07-043-3/+3
|
* Handle GL_REPOSITORY env variable and use it in api callsAlejandro Rodríguez2017-05-112-2/+4
|
* remove no longer needed gitlab_initElan Ruusamäe2016-12-013-3/+0
|
* custom_hook: add support for global custom hooksDirk Hörner2016-12-013-0/+3
| | | | | | | | | | | | | This commit adds the option of having another set of global custom hooks along with the already supported repository local custom hooks. The repository local custom hook is executed first (if available). If successful, execution continues with the global custom hook (if available). This way, local custom hooks get priority over global custom hooks. Global custom hooks can be enabled by placing an executable file into the "custom_hooks" directory within gitlab-shell (create if it does not exist, yet).
* custom_hook: refactor to pull repo_path into classDirk Hörner2016-12-013-3/+3
| | | | | | This commit takes the GitlabCustomHook a bit clother to the other hook handling classes by receiving the repo_path as argument to initialize() instead of passing it to each method.
* added GL_IDadd_gl_idValery Sizov2016-10-053-4/+5
|
* Track ongoing pushes and reject mv-storage commands if there are push ↵mv-storageAlejandro Rodríguez2016-07-271-1/+7
| | | | running (after waiting some time)
* Remove spaceremove-env-setJacob Vosmaer2016-07-201-1/+1
|
* Unset GL_ID and GL_PROTOCOL immediatelyJacob Vosmaer2016-07-202-9/+3
| | | | | | Neither other code executing in the hook process nor subprocesses of the hook process need access to the GL_ID / GL_PROTOCOL variables so we can just unset them the moment we fetch them.
* Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] and make it mandatory with no ↵Patricio Cano2016-07-051-1/+1
| | | | fallback value
* Simplify protocol assign, and populate ENV['PROTOCOL'] variable when calling ↵Patricio Cano2016-07-051-3/+1
| | | | hooks via SSH
* Allow GitLab Shell to check for allowed access based on the used Git protocol.Patricio Cano2016-07-051-1/+4
|
* ARGF does more than we wantJacob Vosmaer2016-06-232-2/+2
| | | | | | | | | ARGF is a virtual IO stream that treats the elements of ARGV as paths to files to be opened. In practice, git-receive-pack will probably never pass arguments to pre-receive and post-receive because it is not supposed to (according to 'man 5 githooks'). In case it does, however our hooks should not have the surprise behavior of treating those arguments as files to be opened.
* Move setting/unsetting of GL_ID from lib to executables.Douwe Maan2015-04-061-0/+3
|
* Write GitlabAccess error to stderr.Douwe Maan2015-04-061-0/+3
|
* Revert "Restore hooks PATH before calling ruby."Valery Sizov2014-11-196-65/+50
| | | | This reverts commit cd9e796316560eee596f2681d54a8417389bbe79.
* Restore hooks PATH before calling ruby.Ciro Santilli2014-11-176-50/+65
|
* Support for custom hooksDrew Blessing2014-11-053-5/+24
|
* Remove update hook logicDmitriy Zaporozhets2014-09-011-13/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add new pre-receive and post-receive hooksDmitriy Zaporozhets2014-09-012-0/+34
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Use built-in Ruby Dir.pwd instead of the shellJacob Vosmaer2014-03-071-1/+1
|
* Remove empty post-receive hookJacob Vosmaer2013-07-191-4/+0
|
* Mention that users can edit the hooksJacob Vosmaer2013-07-192-3/+2
|
* Use update hook to add post event to redis. Use GL_ID instead of GL_USERDmitriy Zaporozhets2013-02-142-10/+5
|
* Update hook and support for protected branchesDmitriy Zaporozhets2013-02-062-1/+12
|
* set GL_USERDmitriy Zaporozhets2013-02-041-0/+0
|
* link post-receive hook alsoDmitriy Zaporozhets2013-02-041-0/+12