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/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-16 12:18:32 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-16 12:18:32 +0300
commita43a218c98ba826ac9d8e0aa764d5a9341a6f64d (patch)
tree7311d58d02b22b93d379a8ee969feaa5caa276e1 /doc/api
parentaec9f211e534900f602e769dcdd6f69730849f92 (diff)
parent743d66e4da5c11f638d12a7f7ec6354631ee2b90 (diff)
Merge branch 'releases-feature'
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/repositories.md74
-rw-r--r--doc/api/tags.md106
2 files changed, 106 insertions, 74 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 33167453802..b6cca5d4e2a 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -1,79 +1,5 @@
# Repositories
-## List project repository tags
-
-Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
-
-```
-GET /projects/:id/repository/tags
-```
-
-Parameters:
-
-- `id` (required) - The ID of a project
-
-```json
-[
- {
- "commit": {
- "author_name": "John Smith",
- "author_email": "john@example.com",
- "authored_date": "2012-05-28T04:42:42-07:00",
- "committed_date": "2012-05-28T04:42:42-07:00",
- "committer_name": "Jack Smith",
- "committer_email": "jack@example.com",
- "id": "2695effb5807a22ff3d138d593fd856244e155e7",
- "message": "Initial commit",
- "parents_ids": [
- "2a4b78934375d7f53875269ffd4f45fd83a84ebe"
- ]
- },
- "name": "v1.0.0",
- "message": null
- }
-]
-```
-
-## Create a new tag
-
-Creates new tag in the repository that points to the supplied ref.
-
-```
-POST /projects/:id/repository/tags
-```
-
-Parameters:
-
-- `id` (required) - The ID of a project
-- `tag_name` (required) - The name of a tag
-- `ref` (required) - Create tag using commit SHA, another tag name, or branch name.
-- `message` (optional) - Creates annotated tag.
-
-```json
-{
- "commit": {
- "author_name": "John Smith",
- "author_email": "john@example.com",
- "authored_date": "2012-05-28T04:42:42-07:00",
- "committed_date": "2012-05-28T04:42:42-07:00",
- "committer_name": "Jack Smith",
- "committer_email": "jack@example.com",
- "id": "2695effb5807a22ff3d138d593fd856244e155e7",
- "message": "Initial commit",
- "parents_ids": [
- "2a4b78934375d7f53875269ffd4f45fd83a84ebe"
- ]
- },
- "name": "v1.0.0",
- "message": null
-}
-```
-The message will be `nil` when creating a lightweight tag otherwise
-it will contain the annotation.
-
-It returns 200 if the operation succeed. In case of an error,
-405 with an explaining error message is returned.
-
## List repository tree
Get a list of repository files and directories in a project.
diff --git a/doc/api/tags.md b/doc/api/tags.md
new file mode 100644
index 00000000000..b5b90cf6b82
--- /dev/null
+++ b/doc/api/tags.md
@@ -0,0 +1,106 @@
+# Tags
+
+## List project repository tags
+
+Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
+
+```
+GET /projects/:id/repository/tags
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+
+```json
+[
+ {
+ "commit": {
+ "author_name": "John Smith",
+ "author_email": "john@example.com",
+ "authored_date": "2012-05-28T04:42:42-07:00",
+ "committed_date": "2012-05-28T04:42:42-07:00",
+ "committer_name": "Jack Smith",
+ "committer_email": "jack@example.com",
+ "id": "2695effb5807a22ff3d138d593fd856244e155e7",
+ "message": "Initial commit",
+ "parents_ids": [
+ "2a4b78934375d7f53875269ffd4f45fd83a84ebe"
+ ]
+ },
+ "release": {
+ "tag": "1.0.0",
+ "description": "Amazing release. Wow"
+ },
+ "name": "v1.0.0",
+ "message": null
+ }
+]
+```
+
+## Create a new tag
+
+Creates a new tag in the repository that points to the supplied ref.
+
+```
+POST /projects/:id/repository/tags
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `tag_name` (required) - The name of a tag
+- `ref` (required) - Create tag using commit SHA, another tag name, or branch name.
+- `message` (optional) - Creates annotated tag.
+- `release_description` (optional) - Add release notes to the git tag and store it in the GitLab database.
+
+```json
+{
+ "commit": {
+ "author_name": "John Smith",
+ "author_email": "john@example.com",
+ "authored_date": "2012-05-28T04:42:42-07:00",
+ "committed_date": "2012-05-28T04:42:42-07:00",
+ "committer_name": "Jack Smith",
+ "committer_email": "jack@example.com",
+ "id": "2695effb5807a22ff3d138d593fd856244e155e7",
+ "message": "Initial commit",
+ "parents_ids": [
+ "2a4b78934375d7f53875269ffd4f45fd83a84ebe"
+ ]
+ },
+ "release": {
+ "tag": "1.0.0",
+ "description": "Amazing release. Wow"
+ },
+ "name": "v1.0.0",
+ "message": null
+}
+```
+The message will be `nil` when creating a lightweight tag otherwise
+it will contain the annotation.
+
+It returns 200 if the operation succeed. In case of an error,
+405 with an explaining error message is returned.
+
+
+## New release
+
+Add release notes to the existing git tag
+
+```
+PUT /projects/:id/repository/:tag/release
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `tag` (required) - The name of a tag
+- `description` (required) - Release notes with markdown support
+
+```json
+{
+ "tag": "1.0.0",
+ "description": "Amazing release. Wow"
+}
+```