summaryrefslogtreecommitdiff
path: root/doc/api/branches.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/branches.md')
-rw-r--r--doc/api/branches.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/api/branches.md b/doc/api/branches.md
index 2f9ca62ced6..7d14a3d54b9 100644
--- a/doc/api/branches.md
+++ b/doc/api/branches.md
@@ -12,7 +12,7 @@ Get a list of repository branches from a project, sorted by name alphabetically.
NOTE: **Note:**
This endpoint can be accessed without authentication if the repository is publicly accessible.
-```text
+```plaintext
GET /projects/:id/repository/branches
```
@@ -41,6 +41,7 @@ Example response:
"developers_can_push": false,
"developers_can_merge": false,
"can_push": true,
+ "web_url": "http://gitlab.example.com/my-group/my-project/-/tree/master",
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -68,7 +69,7 @@ Get a single project repository branch.
NOTE: **Note:**
This endpoint can be accessed without authentication if the repository is publicly accessible.
-```text
+```plaintext
GET /projects/:id/repository/branches/:branch
```
@@ -96,6 +97,7 @@ Example response:
"developers_can_push": false,
"developers_can_merge": false,
"can_push": true,
+ "web_url": "http://gitlab.example.com/my-group/my-project/-/tree/master",
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -128,7 +130,7 @@ for information on unprotecting repository branches.
Create a new branch in the repository.
-```text
+```plaintext
POST /projects/:id/repository/branches
```
@@ -171,7 +173,8 @@ Example response:
"default": false,
"developers_can_push": false,
"developers_can_merge": false,
- "can_push": true
+ "can_push": true,
+ "web_url": "http://gitlab.example.com/my-group/my-project/-/tree/newbranch"
}
```
@@ -182,7 +185,7 @@ Delete a branch from the repository.
NOTE: **Note:**
In the case of an error, an explanation message is provided.
-```text
+```plaintext
DELETE /projects/:id/repository/branches/:branch
```
@@ -206,7 +209,7 @@ Will delete all branches that are merged into the project's default branch.
NOTE: **Note:**
[Protected branches](../user/project/protected_branches.md) will not be deleted as part of this operation.
-```text
+```plaintext
DELETE /projects/:id/repository/merged_branches
```