Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
This commit is contained in:
commit
1a6ba7e640
17
README.md
17
README.md
|
@ -127,14 +127,17 @@ or start each component separately
|
|||
|
||||
### GitLab interfaces
|
||||
|
||||
* [GitLab API](doc/api/README.md)
|
||||
* [GitLab API doc](doc/api/README.md) or see the [GitLab API website](http://api.gitlab.org/)
|
||||
|
||||
* [Rake tasks](doc/raketasks)
|
||||
* [Rake tasks](doc/raketasks) including a [backup and restore procedure](doc/raketasks/backup_restore.md)
|
||||
|
||||
* [Directory structure](doc/install/structure.md)
|
||||
|
||||
* [Databases](doc/install/databases.md)
|
||||
* [Database installation](doc/install/databases.md)
|
||||
|
||||
* [Markdown specification](doc/markdown/markdown.md)
|
||||
|
||||
* [Security guide](doc/security/rack_attack.md) to throttle abusive requests
|
||||
|
||||
### Getting help
|
||||
|
||||
|
@ -157,10 +160,8 @@ or start each component separately
|
|||
|
||||
### Getting in touch
|
||||
|
||||
* [Core team](https://github.com/gitlabhq?tab=members)
|
||||
* [Core team](http://gitlab.org/team/)
|
||||
|
||||
* [Contributors](https://github.com/gitlabhq/gitlabhq/graphs/contributors)
|
||||
* [Contributors](http://contributors.gitlab.org/)
|
||||
|
||||
* [Leader](https://github.com/randx)
|
||||
|
||||
* [Contact page](http://gitlab.org/contact/)
|
||||
* [Community](http://gitlab.org/community/)
|
||||
|
|
|
@ -7,7 +7,7 @@ production:
|
|||
reconnect: false
|
||||
database: gitlabhq_production
|
||||
pool: 10
|
||||
username: root
|
||||
username: gitlab
|
||||
password: "secure password"
|
||||
# host: localhost
|
||||
# socket: /tmp/mysql.sock
|
||||
|
|
|
@ -6,8 +6,8 @@ production:
|
|||
encoding: unicode
|
||||
database: gitlabhq_production
|
||||
pool: 10
|
||||
username: git
|
||||
password:
|
||||
# username: git
|
||||
# password:
|
||||
# host: localhost
|
||||
# port: 5432
|
||||
# socket: /tmp/postgresql.sock
|
||||
|
|
|
@ -56,9 +56,10 @@ production: &base
|
|||
# signup_enabled: true
|
||||
|
||||
## Automatic issue closing
|
||||
# If a commit message matches this regular express, all issues referenced from the matched text will be closed
|
||||
# if it's pushed to a project's default branch.
|
||||
# issue_closing_pattern: ^([Cc]loses|[Ff]ixes) +#\d+
|
||||
# If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
|
||||
# This happends when the commit is pushed or merged into the default branch of a project.
|
||||
# When not specified the default issue_closing_pattern as specified below will be used.
|
||||
# issue_closing_pattern: ([Cc]loses|[Ff]ixes) +#\d+
|
||||
|
||||
## Default project features settings
|
||||
default_projects_features:
|
||||
|
|
|
@ -69,7 +69,7 @@ rescue ArgumentError # no user configured
|
|||
end
|
||||
Settings.gitlab['signup_enabled'] ||= false
|
||||
Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
|
||||
Settings.gitlab['issue_closing_pattern'] = '^([Cc]loses|[Ff]ixes) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil?
|
||||
Settings.gitlab['issue_closing_pattern'] = '([Cc]loses|[Ff]ixes) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil?
|
||||
Settings.gitlab['default_projects_features'] ||= {}
|
||||
Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil?
|
||||
Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil?
|
||||
|
|
|
@ -117,7 +117,7 @@ When listing resources you can pass the following parameters:
|
|||
+ [Deploy Keys](deploy_keys.md)
|
||||
+ [System Hooks](system_hooks.md)
|
||||
+ [Groups](groups.md)
|
||||
+ [User Teams](user_teams.md)
|
||||
|
||||
|
||||
## Clients
|
||||
|
||||
|
|
|
@ -20,13 +20,15 @@ Parameters:
|
|||
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
|
||||
596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
|
||||
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
|
||||
"created_at":"2013-10-02T10:12:29Z"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title" : "Another Public key",
|
||||
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
|
||||
596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
|
||||
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
|
||||
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
|
||||
"created_at":"2013-10-02T11:12:29Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -51,7 +53,8 @@ Parameters:
|
|||
"title" : "Public key",
|
||||
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
|
||||
596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
|
||||
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
|
||||
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
|
||||
"created_at":"2013-10-02T10:12:29Z"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ GET /groups
|
|||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Foobar Group",
|
||||
"path": "foo-bar",
|
||||
"owner_id": 18
|
||||
}
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Foobar Group",
|
||||
"path": "foo-bar",
|
||||
"owner_id": 18
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -59,6 +59,19 @@ Parameters:
|
|||
|
||||
## Group members
|
||||
|
||||
|
||||
**Group access levels**
|
||||
|
||||
The group access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
|
||||
|
||||
```
|
||||
GUEST = 10
|
||||
REPORTER = 20
|
||||
DEVELOPER = 30
|
||||
MASTER = 40
|
||||
OWNER = 50
|
||||
```
|
||||
|
||||
### List group members
|
||||
|
||||
Get a list of group members viewable by the authenticated user.
|
||||
|
|
|
@ -22,10 +22,10 @@ GET /issues
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"state": 'closed',
|
||||
"state": "closed",
|
||||
"updated_at": "2012-07-02T17:53:12Z",
|
||||
"created_at": "2012-07-02T17:53:12Z"
|
||||
},
|
||||
|
@ -42,7 +42,7 @@ GET /issues
|
|||
"title": "v1.0",
|
||||
"description": "",
|
||||
"due_date": "2012-07-20",
|
||||
"state": 'reopenend',
|
||||
"state": "reopenend",
|
||||
"updated_at": "2012-07-04T13:42:48Z",
|
||||
"created_at": "2012-07-04T13:42:48Z"
|
||||
},
|
||||
|
@ -51,7 +51,7 @@ GET /issues
|
|||
"username": "jack_smith",
|
||||
"email": "jack@example.com",
|
||||
"name": "Jack Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:01:01Z"
|
||||
},
|
||||
"author": {
|
||||
|
@ -59,10 +59,10 @@ GET /issues
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"state": 'opened',
|
||||
"state": "opened",
|
||||
"updated_at": "2012-07-12T13:43:19Z",
|
||||
"created_at": "2012-06-28T12:58:06Z"
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ Parameters:
|
|||
"title": "v1.0",
|
||||
"description": "",
|
||||
"due_date": "2012-07-20",
|
||||
"state": 'closed',
|
||||
"state": "closed",
|
||||
"updated_at": "2012-07-04T13:42:48Z",
|
||||
"created_at": "2012-07-04T13:42:48Z"
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ Parameters:
|
|||
"username": "jack_smith",
|
||||
"email": "jack@example.com",
|
||||
"name": "Jack Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:01:01Z"
|
||||
},
|
||||
"author": {
|
||||
|
@ -128,10 +128,10 @@ Parameters:
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"state": 'opened',
|
||||
"state": "opened",
|
||||
"updated_at": "2012-07-12T13:43:19Z",
|
||||
"created_at": "2012-06-28T12:58:06Z"
|
||||
}
|
||||
|
|
|
@ -19,14 +19,13 @@ Parameters:
|
|||
"source_branch":"test1",
|
||||
"project_id":3,
|
||||
"title":"test1",
|
||||
"closed":true,
|
||||
"merged":false,
|
||||
"state":"opened",
|
||||
"author":{
|
||||
"id":1,
|
||||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
},
|
||||
"assignee":{
|
||||
|
@ -34,7 +33,7 @@ Parameters:
|
|||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
}
|
||||
}
|
||||
|
@ -62,14 +61,13 @@ Parameters:
|
|||
"source_branch":"test1",
|
||||
"project_id":3,
|
||||
"title":"test1",
|
||||
"closed":true,
|
||||
"merged":false,
|
||||
"state":"merged",
|
||||
"author":{
|
||||
"id":1,
|
||||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
},
|
||||
"assignee":{
|
||||
|
@ -77,7 +75,7 @@ Parameters:
|
|||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +95,7 @@ Parameters:
|
|||
+ `id` (required) - The ID of a project
|
||||
+ `source_branch` (required) - The source branch
|
||||
+ `target_branch` (required) - The target branch
|
||||
+ `assignee_id` - Assignee user ID
|
||||
+ `assignee_id` (optional) - Assignee user ID
|
||||
+ `title` (required) - Title of MR
|
||||
|
||||
```json
|
||||
|
@ -107,14 +105,13 @@ Parameters:
|
|||
"source_branch":"test1",
|
||||
"project_id":3,
|
||||
"title":"test1",
|
||||
"closed":true,
|
||||
"merged":false,
|
||||
"state":"opened",
|
||||
"author":{
|
||||
"id":1,
|
||||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
},
|
||||
"assignee":{
|
||||
|
@ -122,7 +119,7 @@ Parameters:
|
|||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
}
|
||||
}
|
||||
|
@ -145,24 +142,22 @@ Parameters:
|
|||
+ `target_branch` - The target branch
|
||||
+ `assignee_id` - Assignee user ID
|
||||
+ `title` - Title of MR
|
||||
+ `closed` - Status of MR. true - closed
|
||||
|
||||
|
||||
```json
|
||||
|
||||
{
|
||||
"id":1,
|
||||
"target_branch":"master",
|
||||
"source_branch":"test1",
|
||||
"project_id":3,
|
||||
"title":"test1",
|
||||
"closed":true,
|
||||
"merged":false,
|
||||
"state":"opened",
|
||||
"author":{
|
||||
"id":1,
|
||||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
},
|
||||
"assignee":{
|
||||
|
@ -170,7 +165,7 @@ Parameters:
|
|||
"username": "admin",
|
||||
"email":"admin@local.host",
|
||||
"name":"Administrator",
|
||||
"blocked":false,
|
||||
"state":"active",
|
||||
"created_at":"2012-04-29T08:46:00Z"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,21 @@ Returns a list of project milestones.
|
|||
GET /projects/:id/milestones
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id":12,
|
||||
"project_id":16,
|
||||
"title":"10.0",
|
||||
"description":"Version",
|
||||
"due_date":"2013-11-29",
|
||||
"state":"active",
|
||||
"updated_at":"2013-10-02T09:24:18Z",
|
||||
"created_at":"2013-10-02T09:24:18Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a project
|
||||
|
|
|
@ -8,17 +8,22 @@ Get a list of project wall notes.
|
|||
GET /projects/:id/notes
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a project
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 522,
|
||||
"body": "The solution is rather tricky",
|
||||
"attachment":null,
|
||||
"author": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"created_at": "2012-11-27T19:16:44Z"
|
||||
|
@ -26,11 +31,6 @@ GET /projects/:id/notes
|
|||
]
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a project
|
||||
|
||||
|
||||
### Get single wall note
|
||||
|
||||
Returns a single wall note.
|
||||
|
@ -74,6 +74,38 @@ Parameters:
|
|||
+ `id` (required) - The ID of a project
|
||||
+ `issue_id` (required) - The ID of an issue
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id":302,
|
||||
"body":"_Status changed to closed_",
|
||||
"attachment":null,
|
||||
"author":{
|
||||
"id":1,
|
||||
"username":"pipin",
|
||||
"email":"admin@example.com",
|
||||
"name":"Pip",
|
||||
"state":"active",
|
||||
"created_at":"2013-09-30T13:46:01Z"
|
||||
},
|
||||
"created_at":"2013-10-02T09:22:45Z"
|
||||
},
|
||||
{
|
||||
"id":305,
|
||||
"body":"Text of the comment\r\n",
|
||||
"attachment":null,
|
||||
"author":{
|
||||
"id":1,
|
||||
"username":"pipin",
|
||||
"email":"admin@example.com",
|
||||
"name":"Pip",
|
||||
"state":"active",
|
||||
"created_at":"2013-09-30T13:46:01Z"
|
||||
},
|
||||
"created_at":"2013-10-02T09:56:03Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Get single issue note
|
||||
|
||||
|
@ -135,6 +167,24 @@ Parameters:
|
|||
+ `snippet_id` (required) - The ID of a project snippet
|
||||
+ `note_id` (required) - The ID of an snippet note
|
||||
|
||||
```json
|
||||
{
|
||||
"id":52,
|
||||
"title":"Snippet",
|
||||
"file_name":"snippet.rb",
|
||||
"author":{
|
||||
"id":1,
|
||||
"username":"pipin",
|
||||
"email":"admin@example.com",
|
||||
"name":"Pip",
|
||||
"state":"active",
|
||||
"created_at":"2013-09-30T13:46:01Z"
|
||||
},
|
||||
"expires_at":null,
|
||||
"updated_at":"2013-10-02T07:34:20Z",
|
||||
"created_at":"2013-10-02T07:34:20Z"
|
||||
}
|
||||
```
|
||||
|
||||
### Create new snippet note
|
||||
|
||||
|
@ -181,6 +231,22 @@ Parameters:
|
|||
+ `merge_request_id` (required) - The ID of a project merge request
|
||||
+ `note_id` (required) - The ID of a merge request note
|
||||
|
||||
```json
|
||||
{
|
||||
"id":301,
|
||||
"body":"Comment for MR",
|
||||
"attachment":null,
|
||||
"author":{
|
||||
"id":1,
|
||||
"username":"pipin",
|
||||
"email":"admin@example.com",
|
||||
"name":"Pip",
|
||||
"state":"active",
|
||||
"created_at":"2013-09-30T13:46:01Z"
|
||||
},
|
||||
"created_at":"2013-10-02T08:57:14Z"
|
||||
}
|
||||
```
|
||||
|
||||
### Create new merge request note
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ Parameters:
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"expires_at": null,
|
||||
|
|
|
@ -11,51 +11,72 @@ GET /projects
|
|||
```json
|
||||
[
|
||||
{
|
||||
"id": 3,
|
||||
"name": "rails",
|
||||
"id": 4,
|
||||
"description": null,
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
|
||||
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
|
||||
"web_url": "http://example.com/diaspora/diaspora-client",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"created_at": "2013-09-30T13: 46: 02Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "rails",
|
||||
"path_with_namespace": "rails/rails",
|
||||
"issues_enabled": false,
|
||||
"merge_requests_enabled": false,
|
||||
"wall_enabled": true,
|
||||
"wiki_enabled": true,
|
||||
"created_at": "2012-05-23T08:05:02Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "gitlab",
|
||||
"description": null,
|
||||
"default_branch": "api",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"name": "Diaspora Client",
|
||||
"name_with_namespace": "Diaspora / Diaspora Client",
|
||||
"path": "diaspora-client",
|
||||
"path_with_namespace": "diaspora/diaspora-client",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": true,
|
||||
"created_at": "2012-05-30T12:49:20Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"last_activity_at": "2013-09-30T13: 46: 02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"description": "",
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"owner_id": 1,
|
||||
"path": "diaspora",
|
||||
"updated_at": "2013-09-30T13: 46: 02Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"description": null,
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
|
||||
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
|
||||
"web_url": "http://example.com/brightbox/puppet",
|
||||
"owner": {
|
||||
"id": 4,
|
||||
"name": "Brightbox",
|
||||
"created_at": "2013-09-30T13:46:02Z"
|
||||
},
|
||||
"name": "Puppet",
|
||||
"name_with_namespace": "Brightbox / Puppet",
|
||||
"path": "puppet",
|
||||
"path_with_namespace": "brightbox/puppet",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13:46:02Z",
|
||||
"last_activity_at": "2013-09-30T13:46:02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13:46:02Z",
|
||||
"description": "",
|
||||
"id": 4,
|
||||
"name": "Brightbox",
|
||||
"owner_id": 1,
|
||||
"path": "brightbox",
|
||||
"updated_at": "2013-09-30T13:46:02Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -76,29 +97,38 @@ Parameters:
|
|||
|
||||
```json
|
||||
{
|
||||
"id": 5,
|
||||
"name": "gitlab",
|
||||
"name_with_namespace": "GitLab / gitlabhq",
|
||||
"id": 3,
|
||||
"description": null,
|
||||
"default_branch": "api",
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
|
||||
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
|
||||
"web_url": "http://example.com/diaspora/diaspora-project-site",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"created_at": "2013-09-30T13: 46: 02Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"name": "Diaspora Project Site",
|
||||
"name_with_namespace": "Diaspora / Diaspora Project Site",
|
||||
"path": "diaspora-project-site",
|
||||
"path_with_namespace": "diaspora/diaspora-project-site",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": true,
|
||||
"created_at": "2012-05-30T12:49:20Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"last_activity_at": "2013-09-30T13: 46: 02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"description": "",
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"owner_id": 1,
|
||||
"path": "diaspora",
|
||||
"updated_at": "2013-09-30T13: 46: 02Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -191,17 +221,6 @@ Parameters:
|
|||
+ `snippets_enabled` (optional)
|
||||
+ `public` (optional)
|
||||
|
||||
**Project access levels**
|
||||
|
||||
The project access levels are defined in the `user_project.rb` class. Currently, these levels are recognized:
|
||||
|
||||
```
|
||||
GUEST = 10
|
||||
REPORTER = 20
|
||||
DEVELOPER = 30
|
||||
MASTER = 40
|
||||
```
|
||||
|
||||
|
||||
### Create project for user
|
||||
|
||||
|
@ -261,7 +280,7 @@ Parameters:
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z",
|
||||
"access_level": 40
|
||||
}
|
||||
|
@ -417,6 +436,55 @@ Parameters:
|
|||
|
||||
+ `id` (required) - The ID of the project
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name":"async",
|
||||
"commit": {
|
||||
"id":"a2b702edecdf41f07b42653eb1abe30ce98b9fca",
|
||||
"parents": [{
|
||||
"id":"3f94fc7c85061973edc9906ae170cc269b07ca55"
|
||||
}],
|
||||
"tree": "c68537c6534a02cc2b176ca1549f4ffa190b58ee",
|
||||
"message":"give caolan his credit where it's due (up top)",
|
||||
"author": {
|
||||
"name":"Jeremy Ashkenas",
|
||||
"email":"jashkenas@example.com"
|
||||
},
|
||||
"committer": {
|
||||
"name":"Jeremy Ashkenas",
|
||||
"email":"jashkenas@example.com"
|
||||
},
|
||||
"authored_date":"2010-12-08T21:28:50+00:00",
|
||||
"committed_date":"2010-12-08T21:28:50+00:00"
|
||||
},
|
||||
"protected":false
|
||||
},
|
||||
{
|
||||
"name": "gh-pages",
|
||||
"commit": {
|
||||
"id": "101c10a60019fe870d21868835f65c25d64968fc",
|
||||
"parents": [{
|
||||
"id": "9c15d2e26945a665131af5d7b6d30a06ba338aaa"
|
||||
}],
|
||||
"tree": "fb5cc9d45da3014b17a876ad539976a0fb9b352a",
|
||||
"message": "Underscore.js 1.5.2",
|
||||
"author": {
|
||||
"name": "Jeremy Ashkenas",
|
||||
"email": "jashkenas@example.com"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jeremy Ashkenas",
|
||||
"email": "jashkenas@example.com"
|
||||
},
|
||||
"authored_date": "2013-09-07T12: 58: 21+00: 00",
|
||||
"committed_date": "2013-09-07T12: 58: 21+00: 00"
|
||||
},
|
||||
"protected": false
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
### List single branch
|
||||
|
||||
|
|
|
@ -12,6 +12,15 @@ Parameters:
|
|||
|
||||
+ **none**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id":3,
|
||||
"url":"http://example.com/hook",
|
||||
"created_at":"2013-10-02T10:15:31Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Add new system hook hook
|
||||
|
||||
|
@ -34,6 +43,16 @@ Parameters:
|
|||
|
||||
+ `id` (required) - The ID of hook
|
||||
|
||||
```json
|
||||
{
|
||||
"event_name":"project_create",
|
||||
"name":"Ruby",
|
||||
"path":"ruby",
|
||||
"project_id":1,
|
||||
"owner_name":"Someone",
|
||||
"owner_email":"example@gitlabhq.com"
|
||||
}
|
||||
```
|
||||
|
||||
## Delete system hook
|
||||
|
||||
|
|
|
@ -1,209 +0,0 @@
|
|||
## User teams
|
||||
|
||||
### List user teams
|
||||
|
||||
Get a list of user teams viewable by the authenticated user.
|
||||
|
||||
```
|
||||
GET /user_teams
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
id: 1,
|
||||
name: "User team 1",
|
||||
path: "user_team1",
|
||||
owner_id: 1
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "User team 2",
|
||||
path: "user_team2",
|
||||
owner_id: 1
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
### Get single user team
|
||||
|
||||
Get a specific user team, identified by user team ID, which is viewable by the authenticated user.
|
||||
|
||||
```
|
||||
GET /user_teams/:id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user_team
|
||||
|
||||
```json
|
||||
{
|
||||
id: 1,
|
||||
name: "User team 1",
|
||||
path: "user_team1",
|
||||
owner_id: 1
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Create user team
|
||||
|
||||
Creates new user team owned by user. Available only for admins.
|
||||
|
||||
```
|
||||
POST /user_teams
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `name` (required) - new user team name
|
||||
+ `path` (required) - new user team internal name
|
||||
|
||||
|
||||
|
||||
## User team members
|
||||
|
||||
### List user team members
|
||||
|
||||
Get a list of project team members.
|
||||
|
||||
```
|
||||
GET /user_teams/:id/members
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user_team
|
||||
|
||||
|
||||
### Get user team member
|
||||
|
||||
Gets a user team member.
|
||||
|
||||
```
|
||||
GET /user_teams/:id/members/:user_id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user_team
|
||||
+ `user_id` (required) - The ID of a user
|
||||
|
||||
```json
|
||||
{
|
||||
id: 2,
|
||||
username: "john_doe",
|
||||
email: "joh@doe.org",
|
||||
name: "John Doe",
|
||||
state: "active",
|
||||
created_at: "2012-10-22T14:13:35Z",
|
||||
access_level: 30
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Add user team member
|
||||
|
||||
Adds a user to a user team.
|
||||
|
||||
```
|
||||
POST /user_teams/:id/members
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user team
|
||||
+ `user_id` (required) - The ID of a user to add
|
||||
+ `access_level` (required) - Project access level
|
||||
|
||||
|
||||
### Remove user team member
|
||||
|
||||
Removes user from user team.
|
||||
|
||||
```
|
||||
DELETE /user_teams/:id/members/:user_id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user team
|
||||
+ `user_id` (required) - The ID of a team member
|
||||
|
||||
## User team projects
|
||||
|
||||
### List user team projects
|
||||
|
||||
Get a list of project team projects.
|
||||
|
||||
```
|
||||
GET /user_teams/:id/projects
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user_team
|
||||
|
||||
|
||||
### Get user team project
|
||||
|
||||
Gets a user team project.
|
||||
|
||||
```
|
||||
GET /user_teams/:id/projects/:project_id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user_team
|
||||
+ `project_id` (required) - The ID of a user
|
||||
|
||||
```json
|
||||
{
|
||||
id: 12,
|
||||
name: "project1",
|
||||
description: null,
|
||||
default_branch: "develop",
|
||||
public: false,
|
||||
path: "project1",
|
||||
path_with_namespace: "group1/project1",
|
||||
issues_enabled: false,
|
||||
merge_requests_enabled: true,
|
||||
wall_enabled: true,
|
||||
wiki_enabled: false,
|
||||
created_at: "2013-03-11T12:59:08Z",
|
||||
greatest_access_level: 30
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Add user team project
|
||||
|
||||
Adds a project to a user team.
|
||||
|
||||
```
|
||||
POST /user_teams/:id/projects
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user team
|
||||
+ `project_id` (required) - The ID of a project to add
|
||||
+ `greatest_access_level` (required) - Maximum project access level
|
||||
|
||||
|
||||
### Remove user team project
|
||||
|
||||
Removes project from user team.
|
||||
|
||||
```
|
||||
DELETE /user_teams/:id/projects/:project_id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a user team
|
||||
+ `project_id` (required) - The ID of a team project
|
||||
|
|
@ -43,7 +43,8 @@ GET /users
|
|||
"theme_id": 1,
|
||||
"color_scheme_id": 3,
|
||||
"is_admin": false,
|
||||
"can_create_group": true
|
||||
"can_create_group": true,
|
||||
"can_create_project": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -78,7 +79,8 @@ Parameters:
|
|||
"theme_id": 1,
|
||||
"color_scheme_id": 2,
|
||||
"is_admin": false,
|
||||
"can_create_group": true
|
||||
"can_create_group": true,
|
||||
"can_create_project": true
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ GitLab supports the following databases:
|
|||
sudo -u postgres psql -d template1
|
||||
|
||||
# Create a user for GitLab. (change $password to a real password)
|
||||
template1=# CREATE USER git WITH PASSWORD '$password';
|
||||
template1=# CREATE USER git;
|
||||
|
||||
# Create the GitLab production database & grant all privileges on database
|
||||
template1=# CREATE DATABASE gitlabhq_production OWNER git;
|
||||
|
|
|
@ -216,18 +216,18 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
|
|||
# Mysql
|
||||
sudo -u git cp config/database.yml.mysql config/database.yml
|
||||
|
||||
# Make sure to update username/password in config/database.yml.
|
||||
# You only need to adapt the production settings (first part).
|
||||
# If you followed the database guide then please do as follows:
|
||||
# Change 'secure password' with the value you have given to $password
|
||||
# You can keep the double quotes around the password
|
||||
sudo -u git -H editor config/database.yml
|
||||
|
||||
or
|
||||
|
||||
# PostgreSQL
|
||||
sudo -u git cp config/database.yml.postgresql config/database.yml
|
||||
|
||||
# Make sure to update username/password in config/database.yml.
|
||||
# You only need to adapt the production settings (first part).
|
||||
# If you followed the database guide then please do as follows:
|
||||
# Change 'root' to 'gitlab'
|
||||
# Change 'secure password' with the value you have given to $password
|
||||
# You can keep the double quotes around the password
|
||||
sudo -u git -H editor config/database.yml
|
||||
|
||||
# Make config/database.yml readable to git only
|
||||
sudo -u git -H chmod o-rwx config/database.yml
|
||||
|
|
Loading…
Reference in New Issue