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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 21:25:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 21:25:58 +0300
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /doc/api/repository_files.md
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'doc/api/repository_files.md')
-rw-r--r--doc/api/repository_files.md29
1 files changed, 16 insertions, 13 deletions
diff --git a/doc/api/repository_files.md b/doc/api/repository_files.md
index 70b804c368e..0dc50543f1e 100644
--- a/doc/api/repository_files.md
+++ b/doc/api/repository_files.md
@@ -183,10 +183,11 @@ POST /projects/:id/repository/files/:file_path
```
```shell
-curl --request POST --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
- --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
- "content": "some content", "commit_message": "create a new file"}' \
- "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
+curl --request POST --header 'PRIVATE-TOKEN: <your_access_token>' \
+ --header "Content-Type: application/json" \
+ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
+ "content": "some content", "commit_message": "create a new file"}' \
+ "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
Example response:
@@ -218,10 +219,11 @@ PUT /projects/:id/repository/files/:file_path
```
```shell
-curl --request PUT --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
- --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
- "content": "some content", "commit_message": "update file"}' \
- "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
+curl --request PUT --header 'PRIVATE-TOKEN: <your_access_token>' \
+ --header "Content-Type: application/json" \
+ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
+ "content": "some content", "commit_message": "update file"}' \
+ "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
Example response:
@@ -253,7 +255,7 @@ error message. Possible causes for a failed commit include:
user tried to make an empty commit;
- the branch was updated by a Git push while the file edit was in progress.
-Currently GitLab Shell has a boolean return code, preventing GitLab from specifying the error.
+GitLab Shell has a boolean return code, preventing GitLab from specifying the error.
## Delete existing file in repository
@@ -264,10 +266,11 @@ DELETE /projects/:id/repository/files/:file_path
```
```shell
-curl --request DELETE --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
- --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
- "commit_message": "delete file"}' \
- "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
+curl --request DELETE --header 'PRIVATE-TOKEN: <your_access_token>' \
+ --header "Content-Type: application/json" \
+ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
+ "commit_message": "delete file"}' \
+ "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
Parameters: