Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-11-22 01:27:48 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-11-22 06:38:13 +0300
commit27821ce01fde7e5b3dfce243e22894b44aa2a81d (patch)
treed7da5ff0e2c988cbb82214e0950bc8eff47a3803 /doc
parent53c0b6213ff5f06d3ace23a747148d42c917d559 (diff)
Merge branch 'consistent-tags-api' into 'master'
Make tag API for release feature consistent Make tags API consistent with other tags methods. This changes the endpoint from `PUT /projects/:id/repository/:tag/release` to `PUT /projects/:id/repository/tags/:tag_name/release`. On thing the API is still missing, is an error if the tag does not exist. Right now it returns 200 even the tag does not exist. I'll fix that such it returns 404. @stanhu Can you review? @rspeicher This MR should go into 8.2 See merge request !1864
Diffstat (limited to 'doc')
-rw-r--r--doc/api/tags.md39
1 files changed, 32 insertions, 7 deletions
diff --git a/doc/api/tags.md b/doc/api/tags.md
index b5b90cf6b82..085d387e824 100644
--- a/doc/api/tags.md
+++ b/doc/api/tags.md
@@ -29,7 +29,7 @@ Parameters:
]
},
"release": {
- "tag": "1.0.0",
+ "tag_name": "1.0.0",
"description": "Amazing release. Wow"
},
"name": "v1.0.0",
@@ -70,7 +70,7 @@ Parameters:
]
},
"release": {
- "tag": "1.0.0",
+ "tag_name": "1.0.0",
"description": "Amazing release. Wow"
},
"name": "v1.0.0",
@@ -84,23 +84,48 @@ It returns 200 if the operation succeed. In case of an error,
405 with an explaining error message is returned.
-## New release
+## Create a new release
-Add release notes to the existing git tag
+Add release notes to the existing git tag. It returns 201 if the release is
+created successfully. If the tag does not exist, 404 is returned. If there
+already exists a release for the given tag, 409 is returned.
```
-PUT /projects/:id/repository/:tag/release
+POST /projects/:id/repository/tags/:tag_name/release
```
Parameters:
- `id` (required) - The ID of a project
-- `tag` (required) - The name of a tag
+- `tag_name` (required) - The name of a tag
- `description` (required) - Release notes with markdown support
```json
{
- "tag": "1.0.0",
+ "tag_name": "1.0.0",
"description": "Amazing release. Wow"
}
```
+
+## Update a release
+
+Updates the release notes of a given release. It returns 200 if the release is
+successfully updated. If the tag or the release does not exist, it returns 404
+with a proper error message.
+
+```
+PUT /projects/:id/repository/tags/:tag_name/release
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `tag_name` (required) - The name of a tag
+- `description` (required) - Release notes with markdown support
+
+```json
+{
+ "tag_name": "1.0.0",
+ "description": "Amazing release. Wow"
+}
+``` \ No newline at end of file