Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-09-07 18:13:50 +00:00
parent d91333ba6c
commit 49018dacf0
10 changed files with 301 additions and 328 deletions

View File

@ -23,11 +23,11 @@ following endpoint:
GET /projects/:id/approvals GET /projects/:id/approvals
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | ------------------- | | --------- | ------- | -------- | ------------------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
```json ```json
{ {
@ -52,18 +52,18 @@ endpoint:
POST /projects/:id/approvals POST /projects/:id/approvals
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------------------------------------------ | ------- | -------- | -- | | ------------------------------------------------ | ------- | -------- | -- |
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approvals_before_merge` | integer | no | How many approvals are required before a merge request can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. | | `approvals_before_merge` | integer | **{dotted-circle}** No | How many approvals are required before a merge request can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. |
| `disable_overriding_approvers_per_merge_request` | boolean | no | Allow or prevent overriding approvers per merge request. | | `disable_overriding_approvers_per_merge_request` | boolean | **{dotted-circle}** No | Allow or prevent overriding approvers per merge request. |
| `merge_requests_author_approval` | boolean | no | Allow or prevent authors from self approving merge requests; `true` means authors can self approve. | | `merge_requests_author_approval` | boolean | **{dotted-circle}** No | Allow or prevent authors from self approving merge requests; `true` means authors can self approve. |
| `merge_requests_disable_committers_approval` | boolean | no | Allow or prevent committers from self approving merge requests. | | `merge_requests_disable_committers_approval` | boolean | **{dotted-circle}** No | Allow or prevent committers from self approving merge requests. |
| `require_password_to_approve` | boolean | no | Require approver to enter a password to authenticate before adding the approval. | | `require_password_to_approve` | boolean | **{dotted-circle}** No | Require approver to enter a password to authenticate before adding the approval. |
| `reset_approvals_on_push` | boolean | no | Reset approvals on a new push. | | `reset_approvals_on_push` | boolean | **{dotted-circle}** No | Reset approvals on a new push. |
| `selective_code_owner_removals` | boolean | no | Reset approvals from Code Owners if their files changed. Can be enabled only if `reset_approvals_on_push` is disabled. | | `selective_code_owner_removals` | boolean | **{dotted-circle}** No | Reset approvals from Code Owners if their files changed. Can be enabled only if `reset_approvals_on_push` is disabled. |
```json ```json
{ {
@ -91,11 +91,11 @@ GET /projects/:id/approval_rules
Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) parameters to restrict the list of approval rules. Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) parameters to restrict the list of approval rules.
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------|---------|----------|-----------------------------------------------------------| |----------------------|---------|----------|-----------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
```json ```json
[ [
@ -192,12 +192,12 @@ You can request information about a single project approval rules using the foll
GET /projects/:id/approval_rules/:approval_rule_id GET /projects/:id/approval_rules/:approval_rule_id
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------|---------|----------|-----------------------------------------------------------| |----------------------|---------|----------|-----------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_rule_id` | integer | yes | The ID of a approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of a approval rule. |
```json ```json
{ {
@ -293,19 +293,19 @@ You can create project approval rules using the following endpoint:
POST /projects/:id/approval_rules POST /projects/:id/approval_rules
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-------------------------------------|-------------------|----------|------------ | |-------------------------------------|-------------------|----------|------------ |
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approvals_required` | integer | yes | The number of required approvals for this rule. | | `approvals_required` | integer | **{check-circle}** Yes | The number of required approvals for this rule. |
| `name` | string | yes | The name of the approval rule. | | `name` | string | **{check-circle}** Yes | The name of the approval rule. |
| `applies_to_all_protected_branches` | boolean | no | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. | | `applies_to_all_protected_branches` | boolean | **{dotted-circle}** No | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. |
| `group_ids` | Array | no | The IDs of groups as approvers. | | `group_ids` | Array | **{dotted-circle}** No | The IDs of groups as approvers. |
| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). | | `protected_branch_ids` | Array | **{dotted-circle}** No | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
| `report_type` | string | no | The report type required when the rule type is `report_approver`. The supported report types are `license_scanning` and `code_coverage`. | | `report_type` | string | **{dotted-circle}** No | The report type required when the rule type is `report_approver`. The supported report types are `license_scanning` and `code_coverage`. |
| `rule_type` | string | no | The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Other rules are `regular`. | | `rule_type` | string | **{dotted-circle}** No | The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Other rules are `regular`. |
| `user_ids` | Array | no | The IDs of users as approvers. | | `user_ids` | Array | **{dotted-circle}** No | The IDs of users as approvers. |
```json ```json
{ {
@ -420,18 +420,18 @@ PUT /projects/:id/approval_rules/:approval_rule_id
**Important:** Approvers and groups not in the `users`/`groups` parameters are **removed** **Important:** Approvers and groups not in the `users`/`groups` parameters are **removed**
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-------------------------------------|-------------------|----------|-------------| |-------------------------------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approvals_required` | integer | yes | The number of required approvals for this rule. | | `approvals_required` | integer | **{check-circle}** Yes | The number of required approvals for this rule. |
| `approval_rule_id` | integer | yes | The ID of a approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of a approval rule. |
| `name` | string | yes | The name of the approval rule. | | `name` | string | **{check-circle}** Yes | The name of the approval rule. |
| `applies_to_all_protected_branches` | boolean | no | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. | | `applies_to_all_protected_branches` | boolean | **{dotted-circle}** No | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. |
| `group_ids` | Array | no | The IDs of groups as approvers. | | `group_ids` | Array | **{dotted-circle}** No | The IDs of groups as approvers. |
| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). | | `protected_branch_ids` | Array | **{dotted-circle}** No | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
| `user_ids` | Array | no | The IDs of users as approvers. | | `user_ids` | Array | **{dotted-circle}** No | The IDs of users as approvers. |
```json ```json
{ {
@ -525,12 +525,12 @@ You can delete project approval rules using the following endpoint:
DELETE /projects/:id/approval_rules/:approval_rule_id DELETE /projects/:id/approval_rules/:approval_rule_id
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|--------------------|-------------------|----------|------------------------------------------------------------------------------| |--------------------|-------------------|----------|------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_rule_id` | integer | yes | The ID of a approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of a approval rule. |
## Merge request-level MR approvals ## Merge request-level MR approvals
@ -547,12 +547,12 @@ following endpoint:
GET /projects/:id/merge_requests/:merge_request_iid/approvals GET /projects/:id/merge_requests/:merge_request_iid/approvals
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|-------------------|----------|------------------------------------------------------------------------------| |---------------------|-------------------|----------|------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
```json ```json
{ {
@ -593,13 +593,13 @@ endpoint:
POST /projects/:id/merge_requests/:merge_request_iid/approvals POST /projects/:id/merge_requests/:merge_request_iid/approvals
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------|-------------------|----------|-------------| |----------------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approvals_required` | integer | yes | Approvals required before MR can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. | | `approvals_required` | integer | **{check-circle}** Yes | Approvals required before MR can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
```json ```json
{ {
@ -634,12 +634,12 @@ are created for the merge request. If there are none, it is `false`.
This includes additional information about the users who have already approved This includes additional information about the users who have already approved
(`approved_by`) and whether a rule is already approved (`approved`). (`approved_by`) and whether a rule is already approved (`approved`).
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|-------------------|----------|------------------------------------------------------------------------------| |---------------------|-------------------|----------|------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
```json ```json
{ {
@ -703,12 +703,12 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) parameters to restrict the list of approval rules. Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) parameters to restrict the list of approval rules.
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------| |---------------------|---------|----------|---------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
```json ```json
[ [
@ -780,13 +780,13 @@ You can request information about a single merge request approval rule using the
GET /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id GET /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|------------------------------------------------------------------------------| |---------------------|---------|----------|------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_rule_id` | integer | yes | The ID of an approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of an approval rule. |
| `merge_request_iid` | integer | yes | The IID of a merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of a merge request. |
```json ```json
{ {
@ -856,17 +856,17 @@ You can create merge request approval rules using the following endpoint:
POST /projects/:id/merge_requests/:merge_request_iid/approval_rules POST /projects/:id/merge_requests/:merge_request_iid/approval_rules
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------------|---------|----------|------------------------------------------------| |----------------------------|---------|----------|------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
| `approvals_required` | integer | yes | The number of required approvals for this rule. | | `approvals_required` | integer | **{check-circle}** Yes | The number of required approvals for this rule. |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
| `name` | string | yes | The name of the approval rule. | | `name` | string | **{check-circle}** Yes | The name of the approval rule. |
| `approval_project_rule_id` | integer | no | The ID of a project-level approval rule. | | `approval_project_rule_id` | integer | **{dotted-circle}** No | The ID of a project-level approval rule. |
| `group_ids` | Array | no | The IDs of groups as approvers. | | `group_ids` | Array | **{dotted-circle}** No | The IDs of groups as approvers. |
| `user_ids` | Array | no | The IDs of users as approvers. | | `user_ids` | Array | **{dotted-circle}** No | The IDs of users as approvers. |
**Important:** When `approval_project_rule_id` is set, the `name`, `users` and **Important:** When `approval_project_rule_id` is set, the `name`, `users` and
`groups` of project-level rule are copied. The `approvals_required` specified `groups` of project-level rule are copied. The `approvals_required` specified
@ -945,17 +945,17 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rul
**Important:** Updating a `report_approver` or `code_owner` rule is not allowed. **Important:** Updating a `report_approver` or `code_owner` rule is not allowed.
These are system generated rules. These are system generated rules.
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------|---------|----------|------------------------------------------------| |----------------------|---------|----------|------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approvals_required` | integer | yes | The number of required approvals for this rule. | | `approvals_required` | integer | **{check-circle}** Yes | The number of required approvals for this rule. |
| `approval_rule_id` | integer | yes | The ID of an approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of an approval rule. |
| `merge_request_iid` | integer | yes | The IID of a merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of a merge request. |
| `name` | string | yes | The name of the approval rule. | | `name` | string | **{check-circle}** Yes | The name of the approval rule. |
| `group_ids` | Array | no | The IDs of groups as approvers. | | `group_ids` | Array | **{dotted-circle}** No | The IDs of groups as approvers. |
| `user_ids` | Array | no | The IDs of users as approvers. | | `user_ids` | Array | **{dotted-circle}** No | The IDs of users as approvers. |
```json ```json
{ {
@ -1028,13 +1028,13 @@ DELETE /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_
**Important:** Deleting a `report_approver` or `code_owner` rule is not allowed. **Important:** Deleting a `report_approver` or `code_owner` rule is not allowed.
These are system generated rules. These are system generated rules.
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------------| |---------------------|---------|----------|---------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_rule_id` | integer | yes | The ID of an approval rule. | | `approval_rule_id` | integer | **{check-circle}** Yes | The ID of an approval rule. |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
## Approve merge request ## Approve merge request
@ -1047,14 +1047,14 @@ endpoint:
POST /projects/:id/merge_requests/:merge_request_iid/approve POST /projects/:id/merge_requests/:merge_request_iid/approve
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|-------------------------| |---------------------|---------|----------|-------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_password` | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/approvals/settings.md#require-user-password-to-approve) is enabled in the project settings. | | `approval_password` | string | **{dotted-circle}** No | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/approvals/settings.md#require-user-password-to-approve) is enabled in the project settings. |
| `merge_request_iid` | integer | yes | The IID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of the merge request. |
| `sha` | string | no | The `HEAD` of the merge request. | | `sha` | string | **{dotted-circle}** No | The `HEAD` of the merge request. |
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#merge-a-merge-request): if it is passed, then it must when [accepting a merge request](merge_requests.md#merge-a-merge-request): if it is passed, then it must
@ -1110,9 +1110,9 @@ endpoint:
POST /projects/:id/merge_requests/:merge_request_iid/unapprove POST /projects/:id/merge_requests/:merge_request_iid/unapprove
``` ```
**Parameters:** Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------| |---------------------|---------|----------|---------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of a merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The IID of a merge request. |

View File

@ -36,40 +36,40 @@ GET /merge_requests?scope=assigned_to_me
GET /merge_requests?search=foo&in=title GET /merge_requests?search=foo&in=title
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------------------------- | -------------- | -------- | ----------- | | ------------------------------- | -------------- | -------- | ----------- |
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`. Maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. | | `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`. Maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. | | `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. | | `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`. | | `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`. |
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. | | `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `deployed_after` | datetime | no | Return merge requests deployed after the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `deployed_after` | datetime | **{dotted-circle}** No | Return merge requests deployed after the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `deployed_before` | datetime | no | Return merge requests deployed before the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `deployed_before` | datetime | **{dotted-circle}** No | Return merge requests deployed before the given date/time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `environment` | string | no | Returns merge requests deployed to the given environment. | | `environment` | string | **{dotted-circle}** No | Returns merge requests deployed to the given environment. |
| `in` | string | no | Modify the scope of the `search` attribute. `title`, `description`, or a string joining them with comma. Default is `title,description`. | | `in` | string | **{dotted-circle}** No | Modify the scope of the `search` attribute. `title`, `description`, or a string joining them with comma. Default is `title,description`. |
| `labels` | string | no | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. | | `labels` | string | **{dotted-circle}** No | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. |
| `milestone` | string | no | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. | | `milestone` | string | **{dotted-circle}** No | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. |
| `my_reaction_emoji` | string | no | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. | | `my_reaction_emoji` | string | **{dotted-circle}** No | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. |
| `not` | Hash | no | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. | | `not` | Hash | **{dotted-circle}** No | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. |
| `order_by` | string | no | Return requests ordered by `created_at`, `title`, or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8.| | `order_by` | string | **{dotted-circle}** No | Return requests ordered by `created_at`, `title`, or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8.|
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. | | `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. |
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. | | `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. Defaults to `created_by_me`. | | `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. Defaults to `created_by_me`. |
| `search` | string | no | Search merge requests against their `title` and `description`. | | `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
| `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc`. | | `sort` | string | **{dotted-circle}** No | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
| `source_branch` | string | no | Return merge requests with the given source branch. | | `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. | | `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
| `target_branch` | string | no | Return merge requests with the given target branch. | | `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. | | `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. | | `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. | | `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
| `wip` | string | no | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. | | `wip` | string | **{dotted-circle}** No | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
```json ```json
[ [
@ -237,39 +237,39 @@ are the same. In the case of a merge request from a fork,
`target_project_id` and `project_id` are the same and `target_project_id` and `project_id` are the same and
`source_project_id` is the fork project's ID. `source_project_id` is the fork project's ID.
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------------------------- | -------------- | -------- | ----------- | | ------------------------------- | -------------- | -------- | ----------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. | | `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. | | `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id` as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. | | `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. | | `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. | | `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `environment` | string | no | Returns merge requests deployed to the given environment. | | `environment` | string | **{dotted-circle}** No | Returns merge requests deployed to the given environment. |
| `iids[]` | integer array | no | Return the request having the given `iid`. | | `iids[]` | integer array | **{dotted-circle}** No | Return the request having the given `iid`. |
| `labels` | string | no | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. | | `labels` | string | **{dotted-circle}** No | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. |
| `milestone` | string | no | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. | | `milestone` | string | **{dotted-circle}** No | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. |
| `my_reaction_emoji` | string | no | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. | | `my_reaction_emoji` | string | **{dotted-circle}** No | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. |
| `not` | Hash | no | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. | | `not` | Hash | **{dotted-circle}** No | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. |
| `order_by` | string | no | Return requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. | | `order_by` | string | **{dotted-circle}** No | Return requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. | | `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. |
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. | | `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me`, or `all`. | | `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me`, or `all`. |
| `search` | string | no | Search merge requests against their `title` and `description`. | | `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
| `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc`. | | `sort` | string | **{dotted-circle}** No | Return requests sorted in `asc` or `desc` order. Default is `desc`. |
| `source_branch` | string | no | Return merge requests with the given source branch. | | `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. | | `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
| `target_branch` | string | no | Return merge requests with the given target branch. | | `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. | | `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
| `wip` | string | no | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. | | `wip` | string | **{dotted-circle}** No | Filter merge requests against their `wip` status. `yes` to return *only* draft merge requests, `no` to return *non-draft* merge requests. |
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. | | `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. | | `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
```json ```json
[ [
@ -425,38 +425,38 @@ GET /groups/:id/merge_requests?my_reaction_emoji=star
`group_id` represents the ID of the group which contains the project where the MR resides. `group_id` represents the ID of the group which contains the project where the MR resides.
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------------------------- | -------------- | -------- | ----------- | | ------------------------------- | -------------- | -------- | ----------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `approved_by_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. | | `approved_by_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `id`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
| `approved_by_usernames` **(PREMIUM)** | string array | no | Returns merge requests which have been approved by all the users with the given `username`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. | | `approved_by_usernames` **(PREMIUM)** | string array | **{dotted-circle}** No | Returns merge requests which have been approved by all the users with the given `username`, with a maximum of 5. `None` returns merge requests with no approvals. `Any` returns merge requests with an approval. |
| `approver_ids` **(PREMIUM)** | integer array | no | Returns merge requests which have specified all the users with the given `id`s as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. | | `approver_ids` **(PREMIUM)** | integer array | **{dotted-circle}** No | Returns merge requests which have specified all the users with the given `id`s as individual approvers. `None` returns merge requests without approvers. `Any` returns merge requests with an approver. |
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. | | `assignee_id` | integer | **{dotted-circle}** No | Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. |
| `author_id` | integer | no | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. | | `author_id` | integer | **{dotted-circle}** No | Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. |
| `author_username` | string | no | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. | | `author_username` | string | **{dotted-circle}** No | Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. |
| `created_after` | datetime | no | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_after` | datetime | **{dotted-circle}** No | Return merge requests created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `created_before` | datetime | no | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `created_before` | datetime | **{dotted-circle}** No | Return merge requests created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `labels` | string | no | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. | | `labels` | string | **{dotted-circle}** No | Return merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. |
| `milestone` | string | no | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. | | `milestone` | string | **{dotted-circle}** No | Return merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. |
| `my_reaction_emoji` | string | no | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. | | `my_reaction_emoji` | string | **{dotted-circle}** No | Return merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. |
| `non_archived` | boolean | no | Return merge requests from non archived projects only. Default is `true`. | | `non_archived` | boolean | **{dotted-circle}** No | Return merge requests from non archived projects only. Default is `true`. |
| `not` | Hash | no | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. | | `not` | Hash | **{dotted-circle}** No | Return merge requests that do not match the parameters supplied. Accepts: `labels`, `milestone`, `author_id`, `author_username`, `assignee_id`, `assignee_username`, `reviewer_id`, `reviewer_username`, `my_reaction_emoji`. |
| `order_by` | string | no | Return merge requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. | | `order_by` | string | **{dotted-circle}** No | Return merge requests ordered by `created_at`, `title` or `updated_at` fields. Default is `created_at`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331625) in GitLab 14.8. |
| `reviewer_id` | integer | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. | | `reviewer_id` | integer | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. |
| `reviewer_username` | string | no | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. | | `reviewer_username` | string | **{dotted-circle}** No | Returns merge requests which have the user as a [reviewer](../user/project/merge_requests/getting_started.md#reviewer) with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. | | `scope` | string | **{dotted-circle}** No | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`. |
| `search` | string | no | Search merge requests against their `title` and `description`. | | `search` | string | **{dotted-circle}** No | Search merge requests against their `title` and `description`. |
| `source_branch` | string | no | Return merge requests with the given source branch. | | `source_branch` | string | **{dotted-circle}** No | Return merge requests with the given source branch. |
| `sort` | string | no | Return merge requests sorted in `asc` or `desc` order. Default is `desc`. | | `sort` | string | **{dotted-circle}** No | Return merge requests sorted in `asc` or `desc` order. Default is `desc`. |
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. | | `state` | string | **{dotted-circle}** No | Return all merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. |
| `target_branch` | string | no | Return merge requests with the given target branch. | | `target_branch` | string | **{dotted-circle}** No | Return merge requests with the given target branch. |
| `updated_after` | datetime | no | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_after` | datetime | **{dotted-circle}** No | Return merge requests updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `updated_before` | datetime | no | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_before` | datetime | **{dotted-circle}** No | Return merge requests updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. | | `view` | string | **{dotted-circle}** No | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request. |
| `with_labels_details` | boolean | no | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. | | `with_labels_details` | boolean | **{dotted-circle}** No | If `true`, response returns more details for each label in labels field: `:name`, `:color`, `:description`, `:description_html`, `:text_color`. Default is `false`. |
| `with_merge_status_recheck` | boolean | no | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. | | `with_merge_status_recheck` | boolean | **{dotted-circle}** No | If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31890) in GitLab 13.0. |
```json ```json
[ [
@ -606,15 +606,15 @@ it is capped at 1,000. In that case, the API returns the string
GET /projects/:id/merge_requests/:merge_request_iid GET /projects/:id/merge_requests/:merge_request_iid
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|----------------------------------|----------------|----------|-------------| |----------------------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `include_diverged_commits_count` | boolean | no | If `true`, response includes the commits behind the target branch. | | `include_diverged_commits_count` | boolean | **{dotted-circle}** No | If `true`, response includes the commits behind the target branch. |
| `include_rebase_in_progress` | boolean | no | If `true`, response includes whether a rebase operation is in progress. | | `include_rebase_in_progress` | boolean | **{dotted-circle}** No | If `true`, response includes whether a rebase operation is in progress. |
| `render_html` | boolean | no | If `true`, response includes rendered HTML for title and description. | | `render_html` | boolean | **{dotted-circle}** No | If `true`, response includes rendered HTML for title and description. |
```json ```json
{ {
@ -795,12 +795,12 @@ Get a list of merge request participants.
GET /projects/:id/merge_requests/:merge_request_iid/participants GET /projects/:id/merge_requests/:merge_request_iid/participants
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
[ [
@ -831,12 +831,12 @@ Get a list of merge request reviewers.
GET /projects/:id/merge_requests/:merge_request_iid/reviewers GET /projects/:id/merge_requests/:merge_request_iid/reviewers
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
[ [
@ -875,12 +875,12 @@ Get a list of merge request commits.
GET /projects/:id/merge_requests/:merge_request_iid/commits GET /projects/:id/merge_requests/:merge_request_iid/commits
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
[ [
@ -922,13 +922,13 @@ still apply.
GET /projects/:id/merge_requests/:merge_request_iid/changes GET /projects/:id/merge_requests/:merge_request_iid/changes
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `access_raw_diffs` | boolean | no | Retrieve change diffs via Gitaly. | | `access_raw_diffs` | boolean | **{dotted-circle}** No | Retrieve change diffs via Gitaly. |
```json ```json
{ {
@ -1044,12 +1044,12 @@ Get a list of merge request pipelines.
GET /projects/:id/merge_requests/:merge_request_iid/pipelines GET /projects/:id/merge_requests/:merge_request_iid/pipelines
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
[ [
@ -1078,12 +1078,12 @@ The new pipeline can be:
POST /projects/:id/merge_requests/:merge_request_iid/pipelines POST /projects/:id/merge_requests/:merge_request_iid/pipelines
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
{ {
@ -1134,22 +1134,22 @@ POST /projects/:id/merge_requests
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `source_branch` | string | yes | The source branch. | | `source_branch` | string | **{check-circle}** Yes | The source branch. |
| `target_branch` | string | yes | The target branch. | | `target_branch` | string | **{check-circle}** Yes | The target branch. |
| `title` | string | yes | Title of MR. | | `title` | string | **{check-circle}** Yes | Title of MR. |
| `allow_collaboration` | boolean | no | Allow commits from members who can merge to the target branch. | | `allow_collaboration` | boolean | **{dotted-circle}** No | Allow commits from members who can merge to the target branch. |
| `allow_maintainer_to_push` | boolean | no | Alias of `allow_collaboration`. | | `allow_maintainer_to_push` | boolean | **{dotted-circle}** No | Alias of `allow_collaboration`. |
| `approvals_before_merge` **(PREMIUM)** | integer | no | Number of approvals required before this can be merged (see below). | | `approvals_before_merge` **(PREMIUM)** | integer | **{dotted-circle}** No | Number of approvals required before this can be merged (see below). |
| `assignee_id` | integer | no | Assignee user ID. | | `assignee_id` | integer | **{dotted-circle}** No | Assignee user ID. |
| `assignee_ids` | integer array | no | The ID of the users to assign the MR to. Set to `0` or provide an empty value to unassign all assignees. | | `assignee_ids` | integer array | **{dotted-circle}** No | The ID of the users to assign the MR to. Set to `0` or provide an empty value to unassign all assignees. |
| `description` | string | no | Description of the merge request. Limited to 1,048,576 characters. | | `description` | string | **{dotted-circle}** No | Description of the merge request. Limited to 1,048,576 characters. |
| `labels` | string | no | Labels for the merge request, as a comma-separated list. | | `labels` | string | **{dotted-circle}** No | Labels for the merge request, as a comma-separated list. |
| `milestone_id` | integer | no | The global ID of a milestone. | | `milestone_id` | integer | **{dotted-circle}** No | The global ID of a milestone. |
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging. | | `remove_source_branch` | boolean | **{dotted-circle}** No | Flag indicating if a merge request should remove the source branch when merging. |
| `reviewer_ids` | integer array | no | The ID of the users added as a reviewer to the merge request. If set to `0` or left empty, no reviewers are added. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. | | `reviewer_ids` | integer array | **{dotted-circle}** No | The ID of the users added as a reviewer to the merge request. If set to `0` or left empty, no reviewers are added. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
| `squash` | boolean | no | Squash commits into a single commit when merging. | | `squash` | boolean | **{dotted-circle}** No | Squash commits into a single commit when merging. |
| `target_project_id` | integer | no | Numeric ID of the target project. | | `target_project_id` | integer | **{dotted-circle}** No | Numeric ID of the target project. |
If `approvals_before_merge` is not provided, it inherits the value from the target project. If provided, the following conditions must hold for it to take effect: If `approvals_before_merge` is not provided, it inherits the value from the target project. If provided, the following conditions must hold for it to take effect:
@ -1302,24 +1302,24 @@ PUT /projects/:id/merge_requests/:merge_request_iid
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The ID of a merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The ID of a merge request. |
| `add_labels` | string | no | Comma-separated label names to add to a merge request. | | `add_labels` | string | **{dotted-circle}** No | Comma-separated label names to add to a merge request. |
| `allow_collaboration` | boolean | no | Allow commits from members who can merge to the target branch. | | `allow_collaboration` | boolean | **{dotted-circle}** No | Allow commits from members who can merge to the target branch. |
| `allow_maintainer_to_push` | boolean | no | Alias of `allow_collaboration`. | | `allow_maintainer_to_push` | boolean | **{dotted-circle}** No | Alias of `allow_collaboration`. |
| `assignee_id` | integer | no | The ID of the user to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. | | `assignee_id` | integer | **{dotted-circle}** No | The ID of the user to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
| `assignee_ids` | integer array | no | The ID of the users to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. | | `assignee_ids` | integer array | **{dotted-circle}** No | The ID of the users to assign the merge request to. Set to `0` or provide an empty value to unassign all assignees. |
| `description` | string | no | Description of the merge request. Limited to 1,048,576 characters. | | `description` | string | **{dotted-circle}** No | Description of the merge request. Limited to 1,048,576 characters. |
| `discussion_locked` | boolean | no | Flag indicating if the merge request's discussion is locked. If the discussion is locked only project members can add, edit or resolve comments. | | `discussion_locked` | boolean | **{dotted-circle}** No | Flag indicating if the merge request's discussion is locked. If the discussion is locked only project members can add, edit or resolve comments. |
| `labels` | string | no | Comma-separated label names for a merge request. Set to an empty string to unassign all labels. | | `labels` | string | **{dotted-circle}** No | Comma-separated label names for a merge request. Set to an empty string to unassign all labels. |
| `milestone_id` | integer | no | The global ID of a milestone to assign the merge request to. Set to `0` or provide an empty value to unassign a milestone.| | `milestone_id` | integer | **{dotted-circle}** No | The global ID of a milestone to assign the merge request to. Set to `0` or provide an empty value to unassign a milestone.|
| `remove_labels` | string | no | Comma-separated label names to remove from a merge request. | | `remove_labels` | string | **{dotted-circle}** No | Comma-separated label names to remove from a merge request. |
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging. | | `remove_source_branch` | boolean | **{dotted-circle}** No | Flag indicating if a merge request should remove the source branch when merging. |
| `reviewer_ids` | integer array | no | The ID of the users set as a reviewer to the merge request. Set the value to `0` or provide an empty value to unset all reviewers. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. | | `reviewer_ids` | integer array | **{dotted-circle}** No | The ID of the users set as a reviewer to the merge request. Set the value to `0` or provide an empty value to unset all reviewers. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49341) in GitLab 13.8. |
| `squash` | boolean | no | Squash commits into a single commit when merging. | | `squash` | boolean | **{dotted-circle}** No | Squash commits into a single commit when merging. |
| `state_event` | string | no | New state (close/reopen). | | `state_event` | string | **{dotted-circle}** No | New state (close/reopen). |
| `target_branch` | string | no | The target branch. | | `target_branch` | string | **{dotted-circle}** No | The target branch. |
| `title` | string | no | Title of MR. | | `title` | string | **{dotted-circle}** No | Title of MR. |
Must include at least one non-required attribute from above. Must include at least one non-required attribute from above.
@ -1483,8 +1483,8 @@ DELETE /projects/:id/merge_requests/:merge_request_iid
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/4/merge_requests/85" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/4/merge_requests/85"
@ -1498,18 +1498,18 @@ Accept and merge changes submitted with MR using this API.
PUT /projects/:id/merge_requests/:merge_request_iid/merge PUT /projects/:id/merge_requests/:merge_request_iid/merge
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|--------------------------------|----------------|----------|-------------| |--------------------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `merge_commit_message` | string | no | Custom merge commit message. | | `merge_commit_message` | string | **{dotted-circle}** No | Custom merge commit message. |
| `merge_when_pipeline_succeeds` | boolean | no | If `true`, the merge request is merged when the pipeline succeeds. | | `merge_when_pipeline_succeeds` | boolean | **{dotted-circle}** No | If `true`, the merge request is merged when the pipeline succeeds. |
| `sha` | string | no | If present, then this SHA must match the HEAD of the source branch, otherwise the merge fails. | | `sha` | string | **{dotted-circle}** No | If present, then this SHA must match the HEAD of the source branch, otherwise the merge fails. |
| `should_remove_source_branch` | boolean | no | If `true`, removes the source branch. | | `should_remove_source_branch` | boolean | **{dotted-circle}** No | If `true`, removes the source branch. |
| `squash_commit_message` | string | no | Custom squash commit message. | | `squash_commit_message` | string | **{dotted-circle}** No | Custom squash commit message. |
| `squash` | boolean | no | If `true`, the commits are squashed into a single commit on merge. | | `squash` | boolean | **{dotted-circle}** No | If `true`, the commits are squashed into a single commit on merge. |
```json ```json
{ {
@ -1689,12 +1689,12 @@ It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response b
GET /projects/:id/merge_requests/:merge_request_iid/merge_ref GET /projects/:id/merge_requests/:merge_request_iid/merge_ref
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
{ {
@ -1716,12 +1716,12 @@ This API returns specific HTTP status codes on failure:
POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
``` ```
Parameters: Supported attributes:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```json ```json
{ {
@ -1887,9 +1887,9 @@ PUT /projects/:id/merge_requests/:merge_request_iid/rebase
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `skip_ci` | boolean | no | Set to `true` to skip creating a CI pipeline. | | `skip_ci` | boolean | **{dotted-circle}** No | Set to `true` to skip creating a CI pipeline. |
```shell ```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase"
@ -1949,8 +1949,8 @@ PUT /projects/:id/merge_requests/:merge_request_iid/reset_approvals
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|-------------------|----------|-----------------------------------------------------------------------------------------------------------------| |---------------------|-------------------|----------|-----------------------------------------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/reset_approvals" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/reset_approvals"
@ -1970,8 +1970,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/closes_issues
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/closes_issues" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/76/merge_requests/1/closes_issues"
@ -2046,8 +2046,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/subscribe
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/subscribe" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/subscribe"
@ -2216,8 +2216,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/unsubscribe" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/17/unsubscribe"
@ -2386,8 +2386,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/todo
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/27/todo" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/27/todo"
@ -2513,8 +2513,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------------------------| |---------------------|---------|----------|---------------------------------------|
| `id` | String | yes | The ID of the project. | | `id` | String | **{check-circle}** Yes | The ID of the project. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions"
@ -2563,9 +2563,9 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|---------|----------|-------------------------------------------| |---------------------|---------|----------|-------------------------------------------|
| `id` | String | yes | The ID of the project. | | `id` | String | **{check-circle}** Yes | The ID of the project. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `version_id` | integer | yes | The ID of the merge request diff version. | | `version_id` | integer | **{check-circle}** Yes | The ID of the merge request diff version. |
```shell ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions/1" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions/1"
@ -2631,9 +2631,9 @@ POST /projects/:id/merge_requests/:merge_request_iid/time_estimate
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `duration` | string | yes | The duration in human format, such as `3h30m`. | | `duration` | string | **{check-circle}** Yes | The duration in human format, such as `3h30m`. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_estimate?duration=3h30m" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_estimate?duration=3h30m"
@ -2660,8 +2660,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of a project's merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of a project's merge request. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_time_estimate" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_time_estimate"
@ -2688,10 +2688,10 @@ POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
| `duration` | string | yes | The duration in human format, such as `3h30m` | | `duration` | string | **{check-circle}** Yes | The duration in human format, such as `3h30m` |
| `summary` | string | no | A summary of how the time was spent. | | `summary` | string | **{dotted-circle}** No | A summary of how the time was spent. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/add_spent_time?duration=1h" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/add_spent_time?duration=1h"
@ -2718,8 +2718,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of a project's merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of a project's merge request. |
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_spent_time" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_spent_time"
@ -2744,8 +2744,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/time_stats
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------------|----------------|----------|-------------| |---------------------|----------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. | | `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
| `merge_request_iid` | integer | yes | The internal ID of the merge request. | | `merge_request_iid` | integer | **{check-circle}** Yes | The internal ID of the merge request. |
```shell ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_stats" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_stats"

View File

@ -3,49 +3,22 @@ stage: Systems
group: Distribution group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
comments: false comments: false
description: Install GitLab in a cloud native environment description: Install a cloud-native version of GitLab
type: index type: index
--- ---
# Cloud Native GitLab **(FREE SELF)** # Cloud-native GitLab **(FREE SELF)**
[Cloud Native GitLab](https://gitlab.com/gitlab-org/build/CNG) provides cloud A [cloud-native](https://gitlab.com/gitlab-org/build/CNG) version of GitLab is
native containers to deploy GitLab. These containers may be deployed and managed available for deployment on Kubernetes, OpenShift, and Kubernetes-compatible
via Helm using GitLab Charts or GitLab Operator on Kubernetes, OpenShift, platforms. The following deployment methods are available:
and Kubernetes compatible container platforms:
- [Helm charts](https://docs.gitlab.com/charts/): The cloud native Helm chart - [GitLab Helm chart](https://docs.gitlab.com/charts/): A cloud-native version of GitLab
installs GitLab and all of its components on Kubernetes. Use this method if and all of its components. Use this installation method if your infrastructure is built
your infrastructure is built on Kubernetes and you're familiar with how it on Kubernetes and you're familiar with how it works. This method of deployment has different
works. The methods for management, observability, and some concepts are management, observability, and concepts than traditional deployments.
different than traditional deployments. - [GitLab Operator](https://docs.gitlab.com/operator/): An installation and management method
- [GitLab Operator](https://docs.gitlab.com/operator/): The GitLab Operator that follows the
provides an installation and management method for GitLab following the
[Kubernetes Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). [Kubernetes Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/).
You can also use the GitLab Operator to run GitLab in an Use the GitLab Operator to run GitLab in an
[OpenShift](../openshift_and_gitlab/index.md) environment. [OpenShift](../openshift_and_gitlab/index.md) or another Kubernetes-compatible platform.
Here's an overview of how the containers are built:
```mermaid
graph TD
subgraph Code
CNG --> HC
CNG --> GOP
HC --> GOP
end
subgraph Deploy
GOP --> K8s
GOP --> OS
CNG --> DC
HC --> K8s
end
CNG[Cloud Native GitLab containers]
HC[Helm Chart]
K8s(Kubernetes)
GOP[GitLab Operator]
OS(OpenShift)
DC(Docker Compose)
```

View File

@ -80,7 +80,7 @@ If you remove everything below this comment, the pipeline will succeed.
### The main `helmfile.yml` file ### The main `helmfile.yml` file
The template contains a [Helmfile](https://github.com/roboll/helmfile) you can use to manage The template contains a [Helmfile](https://github.com/helmfile/helmfile) you can use to manage
cluster applications with [Helm v3](https://helm.sh/). cluster applications with [Helm v3](https://helm.sh/).
This file has a list of paths to other Helm files for each app. They're all commented out by default, so you must uncomment This file has a list of paths to other Helm files for each app. They're all commented out by default, so you must uncomment

View File

@ -119,7 +119,7 @@ While `1280px` is the standard max width when using fixed layout, some pages sti
### Default dashboard ### Default dashboard
For users who have access to a large number of projects but only keep up with a For users who have access to a large number of projects but only keep up with a
select few, the amount of activity on the default Dashboard page can be select few, the amount of activity on the default dashboard page can be
overwhelming. Changing this setting allows you to redefine your default overwhelming. Changing this setting allows you to redefine your default
dashboard. dashboard.

View File

@ -16,7 +16,7 @@ In the following sections, we detail several best practices for improving perfor
It's *strongly* recommended in any Git system that binary or blob files (for example, packages, audio, video, or graphics) are stored as Large File Storage (LFS) objects. In such setup, the Objects are stored elsewhere, such as in Object Storage, and this can reduce the repository size significantly, thus improving performance. It's *strongly* recommended in any Git system that binary or blob files (for example, packages, audio, video, or graphics) are stored as Large File Storage (LFS) objects. In such setup, the Objects are stored elsewhere, such as in Object Storage, and this can reduce the repository size significantly, thus improving performance.
To analyze if the repository has these sorts of objects, it's recommended to run [`git-sizer`](https://github.com/github/git-sizer) to get a detailed analysis. This tool shows in detail what makes up the repository as well as highlights any areas of concern. If any large objects are found, it's then recommended removing them with tools such as the [BFG Repo Cleaner](https://rtyley.github.io/bfg-repo-cleaner/). To analyze if the repository has these sorts of objects, it's recommended to run a tool like [`git-sizer`](https://github.com/github/git-sizer) to get a detailed analysis. These tools can show in detail what makes up the repository as well as highlights any areas of concern. If any large objects are found, it's then recommended removing them with tools such as [`git filter-repo`](reducing_the_repo_size_using_git.md).
Refer to the [Git LFS documentation for more information](../../../topics/git/lfs/index.md). Refer to the [Git LFS documentation for more information](../../../topics/git/lfs/index.md).

View File

@ -115,7 +115,7 @@ describe('Batch comments draft note component', () => {
await nextTick(); await nextTick();
const publishNowButton = findSubmitReviewButton(); const publishNowButton = findSubmitReviewButton();
expect(publishNowButton.attributes().disabled).toBeTruthy(); expect(publishNowButton.attributes().disabled).toBe('true');
}); });
}); });

View File

@ -111,8 +111,8 @@ describe('diffs/components/commit_item', () => {
const descElement = getDescElement(); const descElement = getDescElement();
const descExpandElement = getDescExpandElement(); const descExpandElement = getDescExpandElement();
expect(descElement.exists()).toBeFalsy(); expect(descElement.exists()).toBe(false);
expect(descExpandElement.exists()).toBeFalsy(); expect(descExpandElement.exists()).toBe(false);
}); });
}); });

View File

@ -50,7 +50,7 @@ describe('IDE shared/TokenedInput', () => {
}); });
it('renders input', () => { it('renders input', () => {
expect(vm.$refs.input).toBeTruthy(); expect(vm.$refs.input).toBeInstanceOf(HTMLInputElement);
expect(vm.$refs.input).toHaveValue(TEST_VALUE); expect(vm.$refs.input).toHaveValue(TEST_VALUE);
}); });

View File

@ -152,7 +152,7 @@ describe('Pipeline Editor | Commit Form', () => {
}); });
it('emits "scrolled-to-commit-form"', () => { it('emits "scrolled-to-commit-form"', () => {
expect(wrapper.emitted()['scrolled-to-commit-form']).toBeTruthy(); expect(wrapper.emitted()['scrolled-to-commit-form']).toHaveLength(1);
}); });
}); });
}); });