Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aee56737
Commit
aee56737
authored
Nov 03, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update api documentation with git hooks.
parent
b85b1f26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
doc/api/projects.md
doc/api/projects.md
+69
-0
No files found.
doc/api/projects.md
View file @
aee56737
...
...
@@ -628,3 +628,72 @@ Parameters:
-
query (required) - A string contained in the project name
-
per_page (optional) - number of projects to return per page
-
page (optional) - the page to retrieve
## Git Hooks (EE only)
### Show project git hooks
Get a project git hook.
```
GET /projects/:id/git_hooks
```
Parameters:
-
`id`
(required) - The ID of a project
```
json
{
"id"
:
1
,
"project_id"
:
3
,
"commit_message_regex"
:
"Fixes
\d
+
\"
,
"
deny_delete_tag
": false,
"
created_at
": "
2012-10-12
T
17
:
04
:
47
Z
"
}
```
### Add project git hook
Adds a git hook to a specified project.
```
POST /projects/:id/git_hooks
```
Parameters:
-
`id`
(required) - The ID of a project
-
`deny_delete_tag`
- Do not allow users to remove git tags with git push
-
`commit_message_regex`
- Commit message regex
### Edit project git hook
Edits a git hook for a specified project.
```
PUT /projects/:id/git_hooks
```
Parameters:
-
`id`
(required) - The ID of a project
-
`deny_delete_tag`
- Do not allow users to remove git tags with git push
-
`commit_message_regex`
- Commit message regex
### Delete project git hook
Removes a git hook from a project. This is an idempotent method and can be called multiple times.
Either the git hook is available or not.
```
DELETE /projects/:id/git_hooks
```
Parameters:
-
`id`
(required) - The ID of a project
Note the JSON response differs if the hook is available or not. If the project hook
is available before it is returned in the JSON response or an empty response is returned.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment