Skip to content

Git hook UI management

Created by: mavimo

This is a PoC to add a Gitlab UI to mange git hooks.

Refs

UI

screen shot 2014-04-27 at 13 14 37

How to use

We need to use gitlab-shell with MR#150 In gitlab-shell hooks folder create a new script (bash, ruby, python, nodejs, ...). The file name must be unique and do not need to refer to hook name (eg: test1).

Create a new JSON file with the same name of script (eg: test1.json) with hook description, like:

{
  "name": "Coding standard (PHP - PSR2)",
  "description": "Process php and inc files using PHP_CodeSniffer using PSR2 standard.",
  "hook": "pre-receive",
  "version": "1.0.0"
}

all items are required.

Go to project settings area and click on Githooks link. Enable or disable the git hooks for the repo.

We need to

  • add tests
  • move some elements (load, list, ...) in a specific model (Githook?) and include it in controller
  • move "hooks container folder" as configurable directory

Merge request reports