summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 15:06:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 15:06:26 +0000
commit84727c8209a4412e21111a07f99b0438b03232de (patch)
tree1fcfa02b01548c3cdc561186870a1c807f227f0b /doc
parentd2798d607e11e0ebae83ae909404834388733428 (diff)
downloadgitlab-ce-84727c8209a4412e21111a07f99b0438b03232de.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/api/releases/index.md173
-rw-r--r--doc/development/api_styleguide.md13
-rw-r--r--doc/raketasks/cleanup.md5
3 files changed, 128 insertions, 63 deletions
diff --git a/doc/api/releases/index.md b/doc/api/releases/index.md
index 8d5b3a65789..4279821d8ed 100644
--- a/doc/api/releases/index.md
+++ b/doc/api/releases/index.md
@@ -57,19 +57,34 @@ Example response:
"committer_email":"admin@example.com",
"committed_date":"2019-01-03T01:55:38.000Z"
},
- "milestone":{
- "id":51,
- "iid":1,
- "project_id":24,
- "title":"v1.0-rc",
- "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
- "state":"closed",
- "created_at":"2019-07-12T19:45:44.256Z",
- "updated_at":"2019-07-12T19:45:44.256Z",
- "due_date":"2019-08-16T11:00:00.256Z",
- "start_date":"2019-07-30T12:00:00.256Z",
- "web_url":"http://localhost:3000/root/awesome-app/-/milestones/1"
- },
+ "milestones": [
+ {
+ "id":51,
+ "iid":1,
+ "project_id":24,
+ "title":"v1.0-rc",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-12T19:45:44.256Z",
+ "updated_at":"2019-07-12T19:45:44.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/1"
+ },
+ {
+ "id":52,
+ "iid":2,
+ "project_id":24,
+ "title":"v1.0",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-16T14:00:12.256Z",
+ "updated_at":"2019-07-16T14:00:12.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/2"
+ }
+ ],
"assets":{
"count":6,
"sources":[
@@ -218,19 +233,34 @@ Example response:
"committer_email":"admin@example.com",
"committed_date":"2019-01-03T01:53:28.000Z"
},
- "milestone":{
- "id":51,
- "iid":1,
- "project_id":24,
- "title":"v1.0-rc",
- "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
- "state":"closed",
- "created_at":"2019-07-12T19:45:44.256Z",
- "updated_at":"2019-07-12T19:45:44.256Z",
- "due_date":"2019-08-16T11:00:00.256Z",
- "start_date":"2019-07-30T12:00:00.256Z",
- "web_url":"http://localhost:3000/root/awesome-app/-/milestones/1"
- },
+ "milestones": [
+ {
+ "id":51,
+ "iid":1,
+ "project_id":24,
+ "title":"v1.0-rc",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-12T19:45:44.256Z",
+ "updated_at":"2019-07-12T19:45:44.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/1"
+ },
+ {
+ "id":52,
+ "iid":2,
+ "project_id":24,
+ "title":"v1.0",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-16T14:00:12.256Z",
+ "updated_at":"2019-07-16T14:00:12.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/2"
+ }
+ ],
"assets":{
"count":4,
"sources":[
@@ -273,7 +303,7 @@ POST /projects/:id/releases
| `tag_name` | string | yes | The tag where the release will be created from. |
| `description` | string | yes | The description of the release. You can use [markdown](../../user/markdown.md). |
| `ref` | string | no | If `tag_name` doesn't exist, the release will be created from `ref`. It can be a commit SHA, another tag name, or a branch name. |
-| `milestone` | string | no | The title of the milestone the release is associated with. |
+| `milestones` | array of string | no | The title of each milestone the release is associated with. |
| `assets:links` | array of hash | no | An array of assets links. |
| `assets:links:name`| string | required by: `assets:links` | The name of the link. |
| `assets:links:url` | string | required by: `assets:links` | The url of the link. |
@@ -283,7 +313,7 @@ Example request:
```sh
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" \
- --data '{ "name": "New release", "tag_name": "v0.3", "description": "Super nice release", "milestone": "v1.0-rc", "assets": { "links": [{ "name": "hoge", "url": "https://google.com" }] } }' \
+ --data '{ "name": "New release", "tag_name": "v0.3", "description": "Super nice release", "milestones": ["v1.0", "v1.0-rc"], "assets": { "links": [{ "name": "hoge", "url": "https://google.com" }] } }' \
--request POST https://gitlab.example.com/api/v4/projects/24/releases
```
@@ -321,19 +351,34 @@ Example response:
"committer_email":"admin@example.com",
"committed_date":"2019-01-03T01:55:38.000Z"
},
- "milestone":{
- "id":51,
- "iid":1,
- "project_id":24,
- "title":"v1.0-rc",
- "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
- "state":"active",
- "created_at":"2019-07-12T19:45:44.256Z",
- "updated_at":"2019-07-12T19:45:44.256Z",
- "due_date":"2019-08-16T11:00:00.256Z",
- "start_date":"2019-07-30T12:00:00.256Z",
- "web_url":"http://localhost:3000/root/awesome-app/-/milestones/1"
- },
+ "milestones": [
+ {
+ "id":51,
+ "iid":1,
+ "project_id":24,
+ "title":"v1.0-rc",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-12T19:45:44.256Z",
+ "updated_at":"2019-07-12T19:45:44.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/1"
+ },
+ {
+ "id":52,
+ "iid":2,
+ "project_id":24,
+ "title":"v1.0",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"closed",
+ "created_at":"2019-07-16T14:00:12.256Z",
+ "updated_at":"2019-07-16T14:00:12.256Z",
+ "due_date":"2019-08-16T11:00:00.256Z",
+ "start_date":"2019-07-30T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/2"
+ }
+ ],
"assets":{
"count":5,
"sources":[
@@ -374,19 +419,19 @@ Update a Release.
PUT /projects/:id/releases/:tag_name
```
-| Attribute | Type | Required | Description |
-| ------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../README.md#namespaced-path-encoding). |
-| `tag_name` | string | yes | The tag where the release will be created from. |
-| `name` | string | no | The release name. |
-| `description` | string | no | The description of the release. You can use [markdown](../../user/markdown.md). |
-| `milestone` | string | no | The title of the milestone to associate with the release (`""` to remove the milestone from the release). |
-| `released_at` | datetime | no | The date when the release will be/was ready. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
+| Attribute | Type | Required | Description |
+| ------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../README.md#namespaced-path-encoding). |
+| `tag_name` | string | yes | The tag where the release will be created from. |
+| `name` | string | no | The release name. |
+| `description` | string | no | The description of the release. You can use [markdown](../../user/markdown.md). |
+| `milestones` | array of string | no | The title of each milestone to associate with the release (`[]` to remove all milestones from the release). |
+| `released_at` | datetime | no | The date when the release will be/was ready. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
Example request:
```sh
-curl --header 'Content-Type: application/json' --request PUT --data '{"name": "new name", "milestone": "v1.0"}' --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1"
+curl --header 'Content-Type: application/json' --request PUT --data '{"name": "new name", "milestones": ["v1.2"]}' --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1"
```
Example response:
@@ -423,19 +468,21 @@ Example response:
"committer_email":"admin@example.com",
"committed_date":"2019-01-03T01:53:28.000Z"
},
- "milestone":{
- "id":53,
- "iid":2,
- "project_id":24,
- "title":"v1.0",
- "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
- "state":"active",
- "created_at":"2019-09-01T13:00:00.256Z",
- "updated_at":"2019-09-01T13:00:00.256Z",
- "due_date":"2019-09-20T13:00:00.256Z",
- "start_date":"2019-09-05T12:00:00.256Z",
- "web_url":"http://localhost:3000/root/awesome-app/-/milestones/3"
- },
+ "milestones": [
+ {
+ "id":53,
+ "iid":3,
+ "project_id":24,
+ "title":"v1.0",
+ "description":"Voluptate fugiat possimus quis quod aliquam expedita.",
+ "state":"active",
+ "created_at":"2019-09-01T13:00:00.256Z",
+ "updated_at":"2019-09-01T13:00:00.256Z",
+ "due_date":"2019-09-20T13:00:00.256Z",
+ "start_date":"2019-09-05T12:00:00.256Z",
+ "web_url":"https://gitlab.example.com/root/awesome-app/-/milestones/3"
+ }
+ ],
"assets":{
"count":4,
"sources":[
diff --git a/doc/development/api_styleguide.md b/doc/development/api_styleguide.md
index 61576236c96..3f81440791e 100644
--- a/doc/development/api_styleguide.md
+++ b/doc/development/api_styleguide.md
@@ -92,5 +92,18 @@ For instance:
Model.create(foo: params[:foo])
```
+## Using API path helpers in GitLab Rails codebase
+
+Because we support [installing GitLab under a relative URL], one must take this
+into account when using API path helpers generated by Grape. Any such API path
+helper usage must be in wrapped into the `expose_path` helper call.
+
+For instance:
+
+```haml
+- endpoint = expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid))
+```
+
[Entity]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/entities.rb
[validation, and coercion of the parameters]: https://github.com/ruby-grape/grape#parameter-validation-and-coercion
+[installing GitLab under a relative URL]: https://docs.gitlab.com/ee/install/relative_url.html
diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md
index f84d29cca9a..e2ec58be367 100644
--- a/doc/raketasks/cleanup.md
+++ b/doc/raketasks/cleanup.md
@@ -16,6 +16,11 @@ sudo gitlab-rake gitlab:cleanup:dirs
bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production
```
+DANGER: **Danger:**
+The following task does not currently work as expected.
+The use will probably mark more existing repositories as orphaned.
+For more information, see the [issue](https://gitlab.com/gitlab-org/gitlab-ee/issues/24633).
+
Rename repositories from all repository storage paths if they don't exist in GitLab database.
The repositories get a `+orphaned+TIMESTAMP` suffix so that they cannot block new repositories from being created.