Commit fbc8b2c2d642d06d77add4908fdc305a9739a30f
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Showing
4 changed files
with
73 additions
and
73 deletions
Show diff stats
app/helpers/tree_helper.rb
| @@ -40,7 +40,7 @@ module TreeHelper | @@ -40,7 +40,7 @@ module TreeHelper | ||
| 40 | # Returns boolean | 40 | # Returns boolean |
| 41 | def markup?(filename) | 41 | def markup?(filename) |
| 42 | filename.downcase.end_with?(*%w(.textile .rdoc .org .creole | 42 | filename.downcase.end_with?(*%w(.textile .rdoc .org .creole |
| 43 | - .mediawiki .rst .asciidoc .pod)) | 43 | + .mediawiki .rst .adoc .asciidoc .pod)) |
| 44 | end | 44 | end |
| 45 | 45 | ||
| 46 | def gitlab_markdown?(filename) | 46 | def gitlab_markdown?(filename) |
app/models/user.rb
| @@ -249,7 +249,7 @@ class User < ActiveRecord::Base | @@ -249,7 +249,7 @@ class User < ActiveRecord::Base | ||
| 249 | def namespace_uniq | 249 | def namespace_uniq |
| 250 | namespace_name = self.username | 250 | namespace_name = self.username |
| 251 | if Namespace.find_by(path: namespace_name) | 251 | if Namespace.find_by(path: namespace_name) |
| 252 | - self.errors.add :username, "already exist" | 252 | + self.errors.add :username, "already exists" |
| 253 | end | 253 | end |
| 254 | end | 254 | end |
| 255 | 255 |
doc/api/system_hooks.md
| 1 | -All methods require admin authorization. | ||
| 2 | - | ||
| 3 | -The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks). | ||
| 4 | - | ||
| 5 | -## List system hooks | ||
| 6 | - | ||
| 7 | -Get list of system hooks | ||
| 8 | - | ||
| 9 | -``` | ||
| 10 | -GET /hooks | ||
| 11 | -``` | ||
| 12 | - | ||
| 13 | -Parameters: | ||
| 14 | - | ||
| 15 | -+ **none** | ||
| 16 | - | ||
| 17 | -```json | ||
| 18 | -[ | ||
| 19 | - { | ||
| 20 | - "id":3, | ||
| 21 | - "url":"http://example.com/hook", | ||
| 22 | - "created_at":"2013-10-02T10:15:31Z" | ||
| 23 | - } | ||
| 24 | -] | ||
| 25 | -``` | ||
| 26 | - | ||
| 27 | -## Add new system hook hook | ||
| 28 | - | ||
| 29 | -``` | ||
| 30 | -POST /hooks | ||
| 31 | -``` | ||
| 32 | - | ||
| 33 | -Parameters: | ||
| 34 | - | ||
| 35 | -+ `url` (required) - The hook URL | ||
| 36 | - | ||
| 37 | - | ||
| 38 | -## Test system hook | ||
| 39 | - | ||
| 40 | -``` | ||
| 41 | -GET /hooks/:id | ||
| 42 | -``` | ||
| 43 | - | ||
| 44 | -Parameters: | ||
| 45 | - | ||
| 46 | -+ `id` (required) - The ID of hook | ||
| 47 | - | ||
| 48 | -```json | ||
| 49 | -{ | ||
| 50 | - "event_name":"project_create", | ||
| 51 | - "name":"Ruby", | ||
| 52 | - "path":"ruby", | ||
| 53 | - "project_id":1, | ||
| 54 | - "owner_name":"Someone", | ||
| 55 | - "owner_email":"example@gitlabhq.com" | ||
| 56 | -} | ||
| 57 | -``` | ||
| 58 | - | ||
| 59 | -## Delete system hook | ||
| 60 | - | ||
| 61 | -Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook | ||
| 62 | -is not available. If the hook is deleted it is also returned as JSON. | ||
| 63 | - | ||
| 64 | -``` | ||
| 65 | -DELETE /hooks/:id | ||
| 66 | -``` | ||
| 67 | - | ||
| 68 | -Parameters: | ||
| 69 | - | ||
| 70 | -+ `id` (required) - The ID of hook | 1 | +All methods require admin authorization. |
| 2 | + | ||
| 3 | +The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks). | ||
| 4 | + | ||
| 5 | +## List system hooks | ||
| 6 | + | ||
| 7 | +Get list of system hooks | ||
| 8 | + | ||
| 9 | +``` | ||
| 10 | +GET /hooks | ||
| 11 | +``` | ||
| 12 | + | ||
| 13 | +Parameters: | ||
| 14 | + | ||
| 15 | ++ **none** | ||
| 16 | + | ||
| 17 | +```json | ||
| 18 | +[ | ||
| 19 | + { | ||
| 20 | + "id":3, | ||
| 21 | + "url":"http://example.com/hook", | ||
| 22 | + "created_at":"2013-10-02T10:15:31Z" | ||
| 23 | + } | ||
| 24 | +] | ||
| 25 | +``` | ||
| 26 | + | ||
| 27 | +## Add new system hook hook | ||
| 28 | + | ||
| 29 | +``` | ||
| 30 | +POST /hooks | ||
| 31 | +``` | ||
| 32 | + | ||
| 33 | +Parameters: | ||
| 34 | + | ||
| 35 | ++ `url` (required) - The hook URL | ||
| 36 | + | ||
| 37 | + | ||
| 38 | +## Test system hook | ||
| 39 | + | ||
| 40 | +``` | ||
| 41 | +GET /hooks/:id | ||
| 42 | +``` | ||
| 43 | + | ||
| 44 | +Parameters: | ||
| 45 | + | ||
| 46 | ++ `id` (required) - The ID of hook | ||
| 47 | + | ||
| 48 | +```json | ||
| 49 | +{ | ||
| 50 | + "event_name":"project_create", | ||
| 51 | + "name":"Ruby", | ||
| 52 | + "path":"ruby", | ||
| 53 | + "project_id":1, | ||
| 54 | + "owner_name":"Someone", | ||
| 55 | + "owner_email":"example@gitlabhq.com" | ||
| 56 | +} | ||
| 57 | +``` | ||
| 58 | + | ||
| 59 | +## Delete system hook | ||
| 60 | + | ||
| 61 | +Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook | ||
| 62 | +is not available. If the hook is deleted it is also returned as JSON. | ||
| 63 | + | ||
| 64 | +``` | ||
| 65 | +DELETE /hooks/:id | ||
| 66 | +``` | ||
| 67 | + | ||
| 68 | +Parameters: | ||
| 69 | + | ||
| 70 | ++ `id` (required) - The ID of hook |
doc/development/architecture.md
| @@ -18,7 +18,7 @@ New releases are generally around the same time as GitLab CE releases with excep | @@ -18,7 +18,7 @@ New releases are generally around the same time as GitLab CE releases with excep | ||
| 18 | 18 | ||
| 19 | # System Layout | 19 | # System Layout |
| 20 | 20 | ||
| 21 | -When referring to ~git in the picures it means the home directory of the git user which is typically /home/git. | 21 | +When referring to ~git in the pictures it means the home directory of the git user which is typically /home/git. |
| 22 | 22 | ||
| 23 | GitLab is primarily installed within the `/home/git` user home directory as `git` user. | 23 | GitLab is primarily installed within the `/home/git` user home directory as `git` user. |
| 24 | Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable). | 24 | Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable). |