@@ -5,7 +5,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
...
@@ -5,7 +5,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type:reference, api
type:reference, api
---
---
# Merge request approvals API **(STARTER)**
# Merge request approvals API **(PREMIUM)**
Configuration for approvals on all Merge Requests (MR) in the project. Must be authenticated for all endpoints.
Configuration for approvals on all Merge Requests (MR) in the project. Must be authenticated for all endpoints.
...
@@ -13,7 +13,8 @@ Configuration for approvals on all Merge Requests (MR) in the project. Must be a
...
@@ -13,7 +13,8 @@ Configuration for approvals on all Merge Requests (MR) in the project. Must be a
### Get Configuration
### Get Configuration
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
You can request information about a project's approval configuration using the
You can request information about a project's approval configuration using the
following endpoint:
following endpoint:
...
@@ -41,7 +42,8 @@ GET /projects/:id/approvals
...
@@ -41,7 +42,8 @@ GET /projects/:id/approvals
### Change configuration
### Change configuration
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
If you are allowed to, you can change approval configuration using the following
If you are allowed to, you can change approval configuration using the following
endpoint:
endpoint:
...
@@ -75,7 +77,8 @@ POST /projects/:id/approvals
...
@@ -75,7 +77,8 @@ POST /projects/:id/approvals
### Get project-level rules
### Get project-level rules
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
> - `protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/460) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.7.
> - `protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/460) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.7.
You can request information about a project's approval rules using the following endpoint:
You can request information about a project's approval rules using the following endpoint:
...
@@ -273,7 +276,8 @@ GET /projects/:id/approval_rules/:approval_rule_id
...
@@ -273,7 +276,8 @@ GET /projects/:id/approval_rules/:approval_rule_id
### Create project-level rule
### Create project-level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can create project approval rules using the following endpoint:
You can create project approval rules using the following endpoint:
...
@@ -375,7 +379,8 @@ POST /projects/:id/approval_rules
...
@@ -375,7 +379,8 @@ POST /projects/:id/approval_rules
### Update project-level rule
### Update project-level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can update project approval rules using the following endpoint:
You can update project approval rules using the following endpoint:
...
@@ -480,7 +485,8 @@ PUT /projects/:id/approval_rules/:approval_rule_id
...
@@ -480,7 +485,8 @@ PUT /projects/:id/approval_rules/:approval_rule_id
### Delete project-level rule
### Delete project-level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can delete project approval rules using the following endpoint:
You can delete project approval rules using the following endpoint:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
NOTE:
NOTE:
This API endpoint has been deprecated. Please use Approval Rule API instead.
This API endpoint has been deprecated. Please use Approval Rule API instead.
...
@@ -566,7 +573,8 @@ Configuration for approvals on a specific Merge Request. Must be authenticated f
...
@@ -566,7 +573,8 @@ Configuration for approvals on a specific Merge Request. Must be authenticated f
### Get Configuration
### Get Configuration
> Introduced in [GitLab Starter](https://about.gitlab.com/pricing/) 8.9.
> - Introduced in GitLab 8.9.
> - Moved to GitLab Premium in 13.9.
You can request information about a merge request's approval status using the
You can request information about a merge request's approval status using the
following endpoint:
following endpoint:
...
@@ -612,7 +620,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
...
@@ -612,7 +620,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
### Change approval configuration
### Change approval configuration
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
If you are allowed to, you can change `approvals_required` using the following
If you are allowed to, you can change `approvals_required` using the following
endpoint:
endpoint:
...
@@ -648,7 +657,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals
...
@@ -648,7 +657,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals
### Change allowed approvers for Merge Request
### Change allowed approvers for Merge Request
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/183) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
NOTE:
NOTE:
This API endpoint has been deprecated. Please use Approval Rule API instead.
This API endpoint has been deprecated. Please use Approval Rule API instead.
...
@@ -722,7 +732,8 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers
...
@@ -722,7 +732,8 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers
### Get the approval state of merge requests
### Get the approval state of merge requests
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can request information about a merge request's approval state by using the following endpoint:
You can request information about a merge request's approval state by using the following endpoint:
...
@@ -794,7 +805,8 @@ This includes additional information about the users who have already approved
...
@@ -794,7 +805,8 @@ This includes additional information about the users who have already approved
### Get merge request level rules
### Get merge request level rules
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can request information about a merge request's approval rules using the following endpoint:
You can request information about a merge request's approval rules using the following endpoint:
...
@@ -871,7 +883,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
...
@@ -871,7 +883,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
### Create merge request level rule
### Create merge request level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can create merge request approval rules using the following endpoint:
You can create merge request approval rules using the following endpoint:
...
@@ -955,7 +968,8 @@ will be used.
...
@@ -955,7 +968,8 @@ will be used.
### Update merge request level rule
### Update merge request level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can update merge request approval rules using the following endpoint:
You can update merge request approval rules using the following endpoint:
...
@@ -1040,7 +1054,8 @@ These are system generated rules.
...
@@ -1040,7 +1054,8 @@ These are system generated rules.
### Delete merge request level rule
### Delete merge request level rule
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
You can delete merge request approval rules using the following endpoint:
You can delete merge request approval rules using the following endpoint:
...
@@ -1061,7 +1076,8 @@ These are system generated rules.
...
@@ -1061,7 +1076,8 @@ These are system generated rules.
## Approve Merge Request
## Approve Merge Request
> Introduced in [GitLab Starter](https://about.gitlab.com/pricing/) 8.9.
> - Introduced in GitLab 8.9.
> - Moved to GitLab Premium in 13.9.
If you are allowed to, you can approve a merge request using the following
If you are allowed to, you can approve a merge request using the following
endpoint:
endpoint:
...
@@ -1077,7 +1093,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approve
...
@@ -1077,7 +1093,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approve
| `id` | integer | yes | The ID of a project |
| `id` | integer | yes | The ID of a project |
| `merge_request_iid` | integer | yes | The IID of MR |
| `merge_request_iid` | integer | yes | The IID of MR |
| `sha` | string | no | The HEAD of the MR |
| `sha` | string | no | The HEAD of the MR |
| `approval_password`**(STARTER)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/merge_request_approvals.md#require-authentication-when-approving-a-merge-request) is enabled in the project settings. |
| `approval_password`**(PREMIUM)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/merge_request_approvals.md#require-authentication-when-approving-a-merge-request) is enabled in the project settings. |
The `sha` parameter works in the same way as
The `sha` parameter works in the same way as
when [accepting a merge request](merge_requests.md#accept-mr): if it is passed, then it must
when [accepting a merge request](merge_requests.md#accept-mr): if it is passed, then it must
...
@@ -1124,7 +1140,8 @@ does not match, the response code will be `409`.
...
@@ -1124,7 +1140,8 @@ does not match, the response code will be `409`.
## Unapprove Merge Request
## Unapprove Merge Request
>Introduced in [GitLab Starter](https://about.gitlab.com/pricing/) 9.0.
> - Introduced in GitLab 9.0.
> - Moved to GitLab Premium in 13.9.
If you did approve a merge request, you can unapprove it using the following
If you did approve a merge request, you can unapprove it using the following
| `push_access_level` | string | no | Access levels allowed to push (defaults: `40`, maintainer access level) |
| `push_access_level` | string | no | Access levels allowed to push (defaults: `40`, maintainer access level) |
| `merge_access_level` | string | no | Access levels allowed to merge (defaults: `40`, maintainer access level) |
| `merge_access_level` | string | no | Access levels allowed to merge (defaults: `40`, maintainer access level) |
| `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) |
| `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) |
| `allowed_to_push` | array | no | **(STARTER)** Array of access levels allowed to push, with each described by a hash |
| `allowed_to_push` | array | no | **(PREMIUM)** Array of access levels allowed to push, with each described by a hash |
| `allowed_to_merge` | array | no | **(STARTER)** Array of access levels allowed to merge, with each described by a hash |
| `allowed_to_merge` | array | no | **(PREMIUM)** Array of access levels allowed to merge, with each described by a hash |
| `allowed_to_unprotect` | array | no | **(STARTER)** Array of access levels allowed to unprotect, with each described by a hash |
| `allowed_to_unprotect` | array | no | **(PREMIUM)** Array of access levels allowed to unprotect, with each described by a hash |
| `code_owner_approval_required` | boolean | no | **(PREMIUM)** Prevent pushes to this branch if it matches an item in the [`CODEOWNERS` file](../user/project/code_owners.md). (defaults: false) |
| `code_owner_approval_required` | boolean | no | **(PREMIUM)** Prevent pushes to this branch if it matches an item in the [`CODEOWNERS` file](../user/project/code_owners.md). (defaults: false) |
Example response:
Example response:
...
@@ -215,7 +215,7 @@ Example response:
...
@@ -215,7 +215,7 @@ Example response:
}
}
```
```
Users on GitLab [Starter, Bronze, or higher](https://about.gitlab.com/pricing/) will also see
Users on GitLab Premium or higher also see
the `user_id` and `group_id` parameters:
the `user_id` and `group_id` parameters:
Example response:
Example response:
...
@@ -252,7 +252,7 @@ Example response:
...
@@ -252,7 +252,7 @@ Example response:
}
}
```
```
### Example with user / group level access **(STARTER)**
### Example with user / group level access **(PREMIUM)**
Elements in the `allowed_to_push` / `allowed_to_merge` / `allowed_to_unprotect` array should take the
Elements in the `allowed_to_push` / `allowed_to_merge` / `allowed_to_unprotect` array should take the
form `{user_id: integer}`, `{group_id: integer}` or `{access_level: integer}`. Each user must have access to the project and each group must [have this project shared](../user/project/members/share_project_with_groups.md). These access levels allow [more granular control over protected branch access](../user/project/protected_branches.md#restricting-push-and-merge-access-to-certain-users) and were [added to the API](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3516) in GitLab 10.3 EE.
form `{user_id: integer}`, `{group_id: integer}` or `{access_level: integer}`. Each user must have access to the project and each group must [have this project shared](../user/project/members/share_project_with_groups.md). These access levels allow [more granular control over protected branch access](../user/project/protected_branches.md#restricting-push-and-merge-access-to-certain-users) and were [added to the API](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3516) in GitLab 10.3 EE.
...
@@ -295,7 +295,9 @@ Example response:
...
@@ -295,7 +295,9 @@ Example response:
}
}
```
```
### Example with allow to push and allow to merge access **(STARTER)**
### Example with allow to push and allow to merge access **(PREMIUM)**
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, users.
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, users.
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs, notes, and commits. Find more about [the feature](../integration/elasticsearch.md). **(STARTER)**
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs, notes, and commits. Find more about [the feature](../integration/elasticsearch.md). **(PREMIUM)**
The response depends on the requested scope.
The response depends on the requested scope.
...
@@ -266,7 +266,9 @@ Example response:
...
@@ -266,7 +266,9 @@ Example response:
]
]
```
```
### Scope: wiki_blobs **(STARTER)**
### Scope: wiki_blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -295,7 +297,9 @@ Example response:
...
@@ -295,7 +297,9 @@ Example response:
NOTE:
NOTE:
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
### Scope: commits **(STARTER)**
### Scope: commits **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -328,7 +332,9 @@ Example response:
...
@@ -328,7 +332,9 @@ Example response:
]
]
```
```
### Scope: blobs **(STARTER)**
### Scope: blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -367,7 +373,9 @@ Example response:
...
@@ -367,7 +373,9 @@ Example response:
NOTE:
NOTE:
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the file name and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the file name and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
### Scope: notes **(STARTER)**
### Scope: notes **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -444,7 +452,7 @@ GET /groups/:id/search
...
@@ -444,7 +452,7 @@ GET /groups/:id/search
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, users.
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, users.
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs, notes, and commits. Find more about [the feature](../integration/elasticsearch.md). **(STARTER)**
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs, notes, and commits. Find more about [the feature](../integration/elasticsearch.md). **(PREMIUM)**
The response depends on the requested scope.
The response depends on the requested scope.
...
@@ -648,7 +656,9 @@ Example response:
...
@@ -648,7 +656,9 @@ Example response:
]
]
```
```
### Scope: wiki_blobs **(STARTER)**
### Scope: wiki_blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -677,7 +687,9 @@ Example response:
...
@@ -677,7 +687,9 @@ Example response:
NOTE:
NOTE:
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
### Scope: commits **(STARTER)**
### Scope: commits **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -710,7 +722,9 @@ Example response:
...
@@ -710,7 +722,9 @@ Example response:
]
]
```
```
### Scope: blobs **(STARTER)**
### Scope: blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -749,7 +763,9 @@ Example response:
...
@@ -749,7 +763,9 @@ Example response:
NOTE:
NOTE:
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the file name and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the file name and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
### Scope: notes **(STARTER)**
### Scope: notes **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -998,7 +1014,9 @@ Example response:
...
@@ -998,7 +1014,9 @@ Example response:
]
]
```
```
### Scope: notes **(STARTER)**
### Scope: notes **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -1032,7 +1050,9 @@ Example response:
...
@@ -1032,7 +1050,9 @@ Example response:
]
]
```
```
### Scope: wiki_blobs **(STARTER)**
### Scope: wiki_blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -1078,7 +1098,9 @@ Example response:
...
@@ -1078,7 +1098,9 @@ Example response:
NOTE:
NOTE:
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
`filename` is deprecated in favor of `path`. Both return the full path of the file inside the repository, but in the future `filename` will be only the filename and not the full path. For details, see [issue 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521).
### Scope: commits **(STARTER)**
### Scope: commits **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...
@@ -1111,7 +1133,9 @@ Example response:
...
@@ -1111,7 +1133,9 @@ Example response:
]
]
```
```
### Scope: blobs **(STARTER)**
### Scope: blobs **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
@@ -17,7 +17,7 @@ at most once every 5 minutes on GitLab.com with [the limit set by the administra
...
@@ -17,7 +17,7 @@ at most once every 5 minutes on GitLab.com with [the limit set by the administra
There are two kinds of repository mirroring supported by GitLab:
There are two kinds of repository mirroring supported by GitLab:
-[Push](#pushing-to-a-remote-repository): for mirroring a GitLab repository to another location. **(FREE)**
-[Push](#pushing-to-a-remote-repository): for mirroring a GitLab repository to another location. **(FREE)**
-[Pull](#pulling-from-a-remote-repository): for mirroring a repository from another location to GitLab. **(STARTER)**
-[Pull](#pulling-from-a-remote-repository): for mirroring a repository from another location to GitLab. **(PREMIUM)**
When the mirror repository is updated, all new branches, tags, and commits will be visible in the
When the mirror repository is updated, all new branches, tags, and commits will be visible in the
project's activity feed.
project's activity feed.
...
@@ -37,7 +37,7 @@ The following are some possible use cases for repository mirroring:
...
@@ -37,7 +37,7 @@ The following are some possible use cases for repository mirroring:
- You migrated to GitLab but still need to keep your project in another source. In that case, you
- You migrated to GitLab but still need to keep your project in another source. In that case, you
can simply set it up to mirror to GitLab (pull) and all the essential history of commits, tags,
can simply set it up to mirror to GitLab (pull) and all the essential history of commits, tags,
and branches will be available in your GitLab instance. **(STARTER)**
and branches will be available in your GitLab instance. **(PREMIUM)**
- You have old projects in another source that you don't use actively anymore, but don't want to
- You have old projects in another source that you don't use actively anymore, but don't want to
remove for archiving purposes. In that case, you can create a push mirror so that your active
remove for archiving purposes. In that case, you can create a push mirror so that your active
GitLab repository can push its changes to the old location.
GitLab repository can push its changes to the old location.
...
@@ -205,10 +205,11 @@ If it is not working correctly a red `error` tag appears and shows the error mes
...
@@ -205,10 +205,11 @@ If it is not working correctly a red `error` tag appears and shows the error mes
1. Fill in the **Password** field with the GitLab personal access token created on the destination GitLab instance.
1. Fill in the **Password** field with the GitLab personal access token created on the destination GitLab instance.
1. Click the **Mirror repository** button.
1. Click the **Mirror repository** button.
## Pulling from a remote repository **(STARTER)**
## Pulling from a remote repository **(PREMIUM)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51) in GitLab Enterprise Edition 8.2.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51) in GitLab Enterprise Edition 8.2.
> - [Added Git LFS support](https://gitlab.com/gitlab-org/gitlab/-/issues/10871) in [GitLab Starter](https://about.gitlab.com/pricing/) 11.11.
> - [Added Git LFS support](https://gitlab.com/gitlab-org/gitlab/-/issues/10871) in GitLab 11.11.
> - Moved to GitLab Premium in 13.9.
You can set up a repository to automatically have its branches, tags, and commits updated from an
You can set up a repository to automatically have its branches, tags, and commits updated from an
upstream repository.
upstream repository.
...
@@ -262,9 +263,10 @@ Repository mirrors are updated as Sidekiq becomes available to process them. If
...
@@ -262,9 +263,10 @@ Repository mirrors are updated as Sidekiq becomes available to process them. If
- Fails (for example, a branch diverged from upstream), it will be attempted again later. Mirrors can fail
- Fails (for example, a branch diverged from upstream), it will be attempted again later. Mirrors can fail
up to 14 times before they will not be enqueued for update again.
up to 14 times before they will not be enqueued for update again.
### Overwrite diverged branches **(STARTER)**
### Overwrite diverged branches **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4559) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.6.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4559) in GitLab 10.6.
> - Moved to GitLab Premium in 13.9.
You can choose to always update your local branches with remote versions, even if they have
You can choose to always update your local branches with remote versions, even if they have
diverged from the remote.
diverged from the remote.
...
@@ -274,7 +276,9 @@ For mirrored branches, enabling this option results in the loss of local changes
...
@@ -274,7 +276,9 @@ For mirrored branches, enabling this option results in the loss of local changes
To use this option, check the **Overwrite diverged branches** box when creating a repository mirror.
To use this option, check the **Overwrite diverged branches** box when creating a repository mirror.
### Trigger pipelines for mirror updates **(STARTER)**
### Trigger pipelines for mirror updates **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
If this option is enabled, pipelines will be triggered when branches or tags are
If this option is enabled, pipelines will be triggered when branches or tags are
updated from the remote repository. Depending on the activity of the remote
updated from the remote repository. Depending on the activity of the remote
...
@@ -282,9 +286,10 @@ repository, this may greatly increase the load on your CI runners. Only enable
...
@@ -282,9 +286,10 @@ repository, this may greatly increase the load on your CI runners. Only enable
this if you know they can handle the load. CI will run using the credentials
this if you know they can handle the load. CI will run using the credentials
assigned when you set up pull mirroring.
assigned when you set up pull mirroring.
### Hard failure **(STARTER)**
### Hard failure **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3117) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.2.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3117) in GitLab 10.2.
> - Moved to GitLab Premium in 13.9.
Once the mirroring process is unsuccessfully retried 14 times in a row, it will get marked as hard
Once the mirroring process is unsuccessfully retried 14 times in a row, it will get marked as hard
failed. This will become visible in either the:
failed. This will become visible in either the:
...
@@ -295,9 +300,10 @@ failed. This will become visible in either the:
...
@@ -295,9 +300,10 @@ failed. This will become visible in either the:
When a project is hard failed, it will no longer get picked up for mirroring.
When a project is hard failed, it will no longer get picked up for mirroring.
You can resume the project mirroring again by [forcing an update](#forcing-an-update).
You can resume the project mirroring again by [forcing an update](#forcing-an-update).
### Trigger an update using the API **(STARTER)**
### Trigger an update using the API **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3453) in [GitLab Starter](https://about.gitlab.com/pricing/) 10.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3453) in GitLab 10.3.
> - Moved to GitLab Premium in 13.9.
Pull mirroring uses polling to detect new branches and commits added upstream, often minutes
Pull mirroring uses polling to detect new branches and commits added upstream, often minutes
afterwards. If you notify GitLab by [API](../../../api/projects.md#start-the-pull-mirroring-process-for-a-project),
afterwards. If you notify GitLab by [API](../../../api/projects.md#start-the-pull-mirroring-process-for-a-project),
...
@@ -305,19 +311,21 @@ updates will be pulled immediately.
...
@@ -305,19 +311,21 @@ updates will be pulled immediately.
For more information, see [Start the pull mirroring process for a Project](../../../api/projects.md#start-the-pull-mirroring-process-for-a-project).
For more information, see [Start the pull mirroring process for a Project](../../../api/projects.md#start-the-pull-mirroring-process-for-a-project).
## Mirror only protected branches **(STARTER)**
## Mirror only protected branches **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
Based on the mirror direction that you choose, you can opt to mirror only the
Based on the mirror direction that you choose, you can opt to mirror only the
[protected branches](../protected_branches.md) from/to your remote repository.
[protected branches](../protected_branches.md) from/to your remote repository.
For pull mirroring, non-protected branches are not mirrored and can diverge.
For pull mirroring, non-protected branches are not mirrored and can diverge.
To use this option, check the **Only mirror protected branches** box when
To use this option, check the **Only mirror protected branches** box when
creating a repository mirror.
creating a repository mirror.**(PREMIUM)**
## SSH authentication
## SSH authentication
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/2551) in [GitLab Starter](https://about.gitlab.com/pricing/) 9.5 for Pull mirroring.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/2551) in GitLab 9.5 for Pull mirroring.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22982) in [GitLab Free](https://about.gitlab.com/pricing/) 11.6 for Push mirroring.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22982) in GitLab 11.6 for Push mirroring.
SSH authentication is mutual:
SSH authentication is mutual:
...
@@ -413,7 +421,9 @@ update button which is available on the **Mirroring repositories** section of th
...
@@ -413,7 +421,9 @@ update button which is available on the **Mirroring repositories** section of th
![Repository mirroring force update user interface](img/repository_mirroring_force_update.png)
![Repository mirroring force update user interface](img/repository_mirroring_force_update.png)
## Bidirectional mirroring **(STARTER)**
## Bidirectional mirroring **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
WARNING:
WARNING:
Bidirectional mirroring may cause conflicts.
Bidirectional mirroring may cause conflicts.
...
@@ -536,7 +546,9 @@ Note that this sample has a few limitations:
...
@@ -536,7 +546,9 @@ Note that this sample has a few limitations:
- The script circumvents the Git hook quarantine environment because the update of `$TARGET_REPO`
- The script circumvents the Git hook quarantine environment because the update of `$TARGET_REPO`
is seen as a ref update and Git will complain about it.
is seen as a ref update and Git will complain about it.
### Mirroring with Perforce Helix via Git Fusion **(STARTER)**
### Mirroring with Perforce Helix via Git Fusion **(PREMIUM)**
> Moved to GitLab Premium in 13.9.
WARNING:
WARNING:
Bidirectional mirroring should not be used as a permanent configuration. Refer to
Bidirectional mirroring should not be used as a permanent configuration. Refer to