diff options
Diffstat (limited to 'doc/api/remote_mirrors.md')
-rw-r--r-- | doc/api/remote_mirrors.md | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/api/remote_mirrors.md b/doc/api/remote_mirrors.md index 0ffff194976..e46a890cbd4 100644 --- a/doc/api/remote_mirrors.md +++ b/doc/api/remote_mirrors.md @@ -11,13 +11,13 @@ outlined below. Returns an Array of remote mirrors and their statuses: -```text +```plaintext GET /projects/:id/remote_mirrors ``` Example request: -```sh +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors' ``` @@ -33,6 +33,7 @@ Example response: "last_update_at": "2020-01-06T17:32:02.823Z", "last_update_started_at": "2020-01-06T17:31:55.864Z", "only_protected_branches": true, + "keep_divergent_refs": true, "update_status": "finished", "url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git" } @@ -49,7 +50,7 @@ and password information. Create a remote mirror for a project. The mirror will be disabled by default. You can enable it by including the optional parameter `enabled` when creating it: -```text +```plaintext POST /projects/:id/remote_mirrors ``` @@ -58,10 +59,11 @@ POST /projects/:id/remote_mirrors | `url` | String | yes | The URL of the remote repository to be mirrored. | | `enabled` | Boolean | no | Determines if the mirror is enabled. | | `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. | +| `keep_divergent_refs` | Boolean | no | Determines if divergent refs are skipped. | Example request: -```sh +```shell curl --request POST --data "url=https://username:token@example.com/gitlab/example.git" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors' ``` @@ -76,6 +78,7 @@ Example response: "last_update_at": null, "last_update_started_at": null, "only_protected_branches": false, + "keep_divergent_refs": false, "update_status": "none", "url": "https://*****:*****@example.com/gitlab/example.git" } @@ -88,7 +91,7 @@ Example response: Toggle a remote mirror on or off, or change which types of branches are mirrored: -```text +```plaintext PUT /projects/:id/remote_mirrors/:mirror_id ``` @@ -97,10 +100,11 @@ PUT /projects/:id/remote_mirrors/:mirror_id | `mirror_id` | Integer | yes | The remote mirror ID. | | `enabled` | Boolean | no | Determines if the mirror is enabled. | | `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. | +| `keep_divergent_refs` | Boolean | no | Determines if divergent refs are skipped. | Example request: -```sh +```shell curl --request PUT --data "enabled=false" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors/101486' ``` @@ -115,6 +119,7 @@ Example response: "last_update_at": "2020-01-06T17:32:02.823Z", "last_update_started_at": "2020-01-06T17:31:55.864Z", "only_protected_branches": true, + "keep_divergent_refs": true, "update_status": "finished", "url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git" } |