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:
Diffstat (limited to 'doc/api/commits.md')
-rw-r--r--doc/api/commits.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/api/commits.md b/doc/api/commits.md
index cd955717e39..68c453aa317 100644
--- a/doc/api/commits.md
+++ b/doc/api/commits.md
@@ -120,7 +120,7 @@ POST /projects/:id/repository/commits
```shell
PAYLOAD=$(cat << 'JSON'
{
- "branch": "master",
+ "branch": "main",
"commit_message": "some commit message",
"actions": [
{
@@ -188,9 +188,9 @@ GitLab supports [form encoding](rest/index.md#encoding-api-parameters-of-array-a
```shell
curl --request POST \
- --form "branch=master" \
+ --form "branch=main" \
--form "commit_message=some commit message" \
- --form "start_branch=master" \
+ --form "start_branch=main" \
--form "actions[][action]=create" \
--form "actions[][file_path]=foo/bar" \
--form "actions[][content]=</path/to/local.file" \
@@ -227,7 +227,7 @@ Parameters:
| `stats` | boolean | no | Include commit stats. Default is true |
```shell
-curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main"
```
Example response:
@@ -250,7 +250,7 @@ Example response:
],
"last_pipeline" : {
"id": 8,
- "ref": "master",
+ "ref": "main",
"sha": "2dc6aa325a317eda67812f05600bdf0fcdc70ab0",
"status": "created"
},
@@ -317,7 +317,7 @@ Parameters:
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
- --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/cherry_pick"
+ --form "branch=main" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/cherry_pick"
```
Example response:
@@ -388,7 +388,7 @@ Parameters:
| `dry_run` | boolean | no | Does not commit any changes. Default is false. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/231032) in GitLab 13.3 |
```shell
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=master" \
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=main" \
"https://gitlab.example.com/api/v4/projects/5/repository/commits/a738f717824ff53aebad8b090c1b79a14f2bd9e8/revert"
```
@@ -454,7 +454,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
```shell
-curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/diff"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/diff"
```
Example response:
@@ -462,7 +462,7 @@ Example response:
```json
[
{
- "diff": "--- a/doc/update/5.4-to-6.0.md\n+++ b/doc/update/5.4-to-6.0.md\n@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files",
+ "diff": "@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files",
"new_path": "doc/update/5.4-to-6.0.md",
"old_path": "doc/update/5.4-to-6.0.md",
"a_mode": null,
@@ -490,7 +490,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
```shell
-curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/comments"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/comments"
```
Example response:
@@ -679,7 +679,7 @@ Example response:
"target_url" : "https://gitlab.example.com/janedoe/gitlab-foss/builds/91",
"finished_at" : null,
"id" : 91,
- "ref" : "master"
+ "ref" : "main"
},
{
"started_at" : null,
@@ -690,7 +690,7 @@ Example response:
"target_url" : "https://gitlab.example.com/janedoe/gitlab-foss/builds/90",
"id" : 90,
"finished_at" : null,
- "ref" : "master",
+ "ref" : "main",
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
"author" : {
"id" : 28,
@@ -789,7 +789,7 @@ Example response:
"state":"opened",
"created_at":"2018-03-26T17:26:30.916Z",
"updated_at":"2018-03-26T17:26:30.916Z",
- "target_branch":"master",
+ "target_branch":"main",
"source_branch":"test-branch",
"upvotes":0,
"downvotes":0,
@@ -830,7 +830,7 @@ Example response:
## Get GPG signature of a commit
-Get the [GPG signature from a commit](../user/project/repository/gpg_signed_commits/index.md),
+Get the [GPG signature from a commit](../user/project/repository/signed_commits/gpg.md),
if it is signed. For unsigned commits, it results in a 404 response.
```plaintext