diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 18:09:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 18:09:10 +0000 |
commit | a3764262c04bafcd6a54aff635541d73a8a630fd (patch) | |
tree | ea54444857967f08b7601886b47d15819990b6cf /doc/api/remote_mirrors.md | |
parent | 049d16d168fdee408b78f5f38619c092fd3b2265 (diff) | |
download | gitlab-ce-a3764262c04bafcd6a54aff635541d73a8a630fd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/remote_mirrors.md')
-rw-r--r-- | doc/api/remote_mirrors.md | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/doc/api/remote_mirrors.md b/doc/api/remote_mirrors.md index 1013ffb49fb..bd59aa64e45 100644 --- a/doc/api/remote_mirrors.md +++ b/doc/api/remote_mirrors.md @@ -8,15 +8,15 @@ type: reference, api # Project remote mirrors API **(FREE)** [Push mirrors](../user/project/repository/mirror/push.md) -defined on a project's repository settings are called "remote mirrors", and the -state of these mirrors can be queried and modified via the remote mirror API -outlined below. +defined on a project's repository settings are called "remote mirrors". You +can query and modify the state of these mirrors with the remote mirror API. -## List a project's remote mirrors +For security reasons, the `url` attribute in the API response is always scrubbed of username +and password information. -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/38121) in GitLab 12.9. +## List a project's remote mirrors -Returns an Array of remote mirrors and their statuses: +Returns an array of remote mirrors and their statuses: ```plaintext GET /projects/:id/remote_mirrors @@ -47,10 +47,6 @@ Example response: ] ``` -NOTE: -For security reasons, the `url` attribute is always scrubbed of username -and password information. - ## Get a single project's remote mirror > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82770) in GitLab 14.10. @@ -84,19 +80,14 @@ Example response: } ``` -NOTE: -For security reasons, the `url` attribute is always scrubbed of username -and password information. - ## Create a pull mirror Learn how to [configure a pull mirror](projects.md#configure-pull-mirroring-for-a-project) using the Projects API. ## Create a push mirror -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24189) in GitLab 12.9. - -Push mirroring is disabled by default. You can enable it by including the optional parameter `enabled` when creating it: +Push mirroring is disabled by default. To enable it, include the optional parameter +`enabled` when you create the mirror: ```plaintext POST /projects/:id/remote_mirrors @@ -106,8 +97,8 @@ POST /projects/:id/remote_mirrors | :---------- | :----- | :--------- | :------------ | | `url` | String | yes | The target URL to which the repository is 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. | +| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. | Example request: @@ -135,8 +126,6 @@ Example response: ## Update a remote mirror's attributes -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/38121) in GitLab 12.9. - Toggle a remote mirror on or off, or change which types of branches are mirrored: @@ -148,8 +137,8 @@ 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. | +| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. | Example request: |