Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !6883

Closed
Created Apr 27, 2014 by Administrator@rootOwner0 of 3 tasks completed0/3 tasks
  • Report abuse
Report abuse

Git hook UI management

  • Overview 21
  • Commits 9
  • Changes 4

Created by: mavimo

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

Refs

  • selecting git repo hooks via the gitlab gui
  • allow new repositories to have default hook script

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
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/mavimo/feature/githook_ui_management