Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-09-12 06:09:25 +00:00
parent 3a4143ad22
commit 24cae4b6d5
18 changed files with 76 additions and 41 deletions

View File

@ -4,7 +4,6 @@
@import './pages/groups';
@import './pages/hierarchy';
@import './pages/issues';
@import './pages/labels';
@import './pages/note_form';
@import './pages/notes';
@import './pages/pipelines';

View File

@ -1,3 +1,5 @@
@import 'mixins_and_variables_and_functions';
.suggest-colors {
padding-top: 3px;
@ -29,19 +31,19 @@
margin-bottom: -5px;
&:first-of-type {
border-top-left-radius: $border-radius-base;
border-top-left-radius: $gl-border-radius-base;
}
&:nth-of-type(7) {
border-top-right-radius: $border-radius-base;
border-top-right-radius: $gl-border-radius-base;
}
&:nth-last-child(7) {
border-bottom-left-radius: $border-radius-base;
border-bottom-left-radius: $gl-border-radius-base;
}
&:last-of-type {
border-bottom-right-radius: $border-radius-base;
border-bottom-right-radius: $gl-border-radius-base;
}
}
}

View File

@ -1,4 +1,5 @@
- page_title _("Labels")
- add_page_specific_style 'page_bundles/labels'
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card labels other-labels js-toggle-container js-admin-labels-container' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c|
- c.with_header do

View File

@ -1,4 +1,6 @@
- page_title _("New Label")
- add_page_specific_style 'page_bundles/labels'
%h1.page-title.gl-font-size-h-display
= _('New Label')
= render 'shared/labels/form', url: admin_labels_path, back_path: admin_labels_path

View File

@ -3,6 +3,7 @@
- search = params[:search]
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || search.present? || subscribed.present?
- add_page_specific_style 'page_bundles/labels'
- if labels_or_filters
#js-promote-label-modal

View File

@ -1,6 +1,7 @@
- add_to_breadcrumbs _("Labels"), group_labels_path(@group)
- breadcrumb_title _("New")
- page_title _("New Label")
- add_page_specific_style 'page_bundles/labels'
%h1.page-title.gl-font-size-h-display
= _('New Label')

View File

@ -1,4 +1,5 @@
- add_page_specific_style 'page_bundles/merge_request'
- add_page_specific_style 'page_bundles/labels'
- add_to_breadcrumbs _("Issues"), project_issues_path(@project)
- breadcrumb_title _("New")
- page_title _("New Issue")

View File

@ -3,6 +3,7 @@
- search = params[:search]
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present?
- add_page_specific_style 'page_bundles/labels'
- if labels_or_filters
#js-promote-label-modal

View File

@ -1,6 +1,7 @@
- add_to_breadcrumbs _("Labels"), project_labels_path(@project)
- breadcrumb_title _("New")
- page_title _("New Label")
- add_page_specific_style 'page_bundles/labels'
%h1.page-title.gl-font-size-h-display
= _('New Label')

View File

@ -4,6 +4,7 @@
- add_page_specific_style 'page_bundles/pipelines'
- add_page_specific_style 'page_bundles/ci_status'
- add_page_specific_style 'page_bundles/merge_request'
- add_page_specific_style 'page_bundles/labels'
- conflicting_mr = @merge_request.existing_mrs_targeting_same_branch.first

View File

@ -15,5 +15,6 @@
- page_title("#{board.name}", _("Boards"))
- add_page_specific_style 'page_bundles/boards'
- add_page_specific_style 'page_bundles/labels'
#js-issuable-board-app{ data: board_data }

View File

@ -11,6 +11,7 @@
- is_merge_request = issuable_type === 'merge_request'
- moved_sidebar_enabled = moved_mr_sidebar_enabled?
- is_merge_request_with_flag = is_merge_request && moved_sidebar_enabled
- add_page_specific_style 'page_bundles/labels'
%aside.right-sidebar.js-right-sidebar.js-issuable-sidebar{ data: { always_show_toggle: true, signed: { in: signed_in }, issuable_type: issuable_type }, class: "#{sidebar_gutter_collapsed_class(is_merge_request_with_flag)} #{'right-sidebar-merge-requests' if is_merge_request_with_flag}", 'aria-live' => 'polite', 'aria-label': issuable_type }
.issuable-sidebar{ class: "#{'is-merge-request' if is_merge_request_with_flag}" }

View File

@ -361,6 +361,7 @@ module Gitlab
config.assets.precompile << "page_bundles/wiki.css"
config.assets.precompile << "page_bundles/work_items.css"
config.assets.precompile << "page_bundles/xterm.css"
config.assets.precompile << "page_bundles/labels.css"
config.assets.precompile << "lazy_bundles/cropper.css"
config.assets.precompile << "lazy_bundles/gridstack.css"
config.assets.precompile << "performance_bar.css"

View File

@ -0,0 +1,18 @@
# frozen_string_literal: true
class DropIndexDeploymentsOnIdWhereClusterIdPresent < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_id_where_cluster_id_present'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :deployments, name: INDEX_NAME
end
def down
# This is based on the following `CREATE INDEX` command in db/init_structure.sql:
# CREATE INDEX index_deployments_on_id_where_cluster_id_present ON deployments
# USING btree (id) WHERE (cluster_id IS NOT NULL);
add_concurrent_index :deployments, :id, name: INDEX_NAME, where: 'cluster_id IS NOT NULL'
end
end

View File

@ -0,0 +1 @@
773a845ec5b33a41cec6498e0fe5c4c033f2a011d0dcbe9feb9bed9779b3134d

View File

@ -31741,8 +31741,6 @@ CREATE INDEX index_deployments_on_environment_status_sha ON deployments USING bt
CREATE INDEX index_deployments_on_id_and_status_and_created_at ON deployments USING btree (id, status, created_at);
CREATE INDEX index_deployments_on_id_where_cluster_id_present ON deployments USING btree (id) WHERE (cluster_id IS NOT NULL);
CREATE INDEX index_deployments_on_project_and_environment_and_updated_at_id ON deployments USING btree (project_id, environment_id, updated_at, id);
CREATE INDEX index_deployments_on_project_and_finished ON deployments USING btree (project_id, finished_at) WHERE (status = 2);

View File

@ -19898,6 +19898,7 @@ A review summary generated by AI.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mergerequestreviewllmsummarycontent"></a>`content` | [`String!`](#string) | Content of the review summary. |
| <a id="mergerequestreviewllmsummarycontenthtml"></a>`contentHtml` | [`String!`](#string) | HTML content of the review summary, converted from Markdown. |
| <a id="mergerequestreviewllmsummarycreatedat"></a>`createdAt` | [`Time!`](#time) | Timestamp of when the review summary was created. |
| <a id="mergerequestreviewllmsummarymergerequestdiffid"></a>`mergeRequestDiffId` | [`ID!`](#id) | ID of the Merge Request diff associated with the review summary. |
| <a id="mergerequestreviewllmsummaryprovider"></a>`provider` | [`String!`](#string) | AI provider that generated the summary. |

View File

@ -10,8 +10,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> `version` value for the `order_by` attribute [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95150) in GitLab 15.4.
Get a list of repository tags from a project, sorted by update date and time in descending order. This endpoint can be accessed without authentication if the
repository is publicly accessible.
Get a list of repository tags from a project, sorted by update date and time in
descending order. If the repository is publicly accessible, authentication
(`--header "PRIVATE-TOKEN: <your_access_token>"`) is not required.
```plaintext
GET /projects/:id/repository/tags
@ -19,12 +20,12 @@ GET /projects/:id/repository/tags
Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer or string| yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `order_by` | string | no | Return tags ordered by `name`, `updated`, or `version`. Default is `updated`. |
| `sort` | string | no | Return tags sorted in `asc` or `desc` order. Default is `desc`. |
| `search` | string | no | Return list of tags matching the search criteria. You can use `^term` and `term$` to find tags that begin and end with `term` respectively. No other regular expressions are supported. |
| Attribute | Type | Required | Description |
|------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `order_by` | string | no | Return tags ordered by `name`, `updated`, or `version`. Default is `updated`. |
| `sort` | string | no | Return tags sorted in `asc` or `desc` order. Default is `desc`. |
| `search` | string | no | Return a list of tags matching the search criteria. You can use `^term` and `term$` to find tags that begin and end with `term` respectively. No other regular expressions are supported. |
```json
[
@ -68,13 +69,14 @@ GET /projects/:id/repository/tags/:tag_name
Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `tag_name` | string | yes | The name of the tag |
| Attribute | Type | Required | Description |
|------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `tag_name` | string | yes | The name of a tag. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/tags/v1.0.0"
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/repository/tags/v1.0.0"
```
Example Response:
@ -115,15 +117,17 @@ POST /projects/:id/repository/tags
Parameters:
| Attribute | Type | Required | Description |
| --------------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `tag_name` | string | yes | The name of a tag |
| `ref` | string | yes | Create tag using commit SHA, another tag name, or branch name |
| `message` | string | no | Creates annotated tag |
| Attribute | Type | Required | Description |
|------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `tag_name` | string | yes | The name of a tag. |
| `ref` | string | yes | Create a tag from a commit SHA, another tag name, or branch name. |
| `message` | string | no | Create an annotated tag. |
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=master"
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=master"
```
Example response:
@ -154,13 +158,12 @@ Example response:
}
```
The message is `null` when creating a lightweight tag. Otherwise, it contains the annotation.
The type of tag created determines the contents of `target` and `message`:
The target contains the tag objects ID when creating annotated tags,
otherwise it contains the commit ID when creating lightweight tags.
- For annotated tags, `message` contains the annotation, and `target` contains the tag object's ID.
- For lightweight tags, `message` is null, and `target` contains the commit ID.
In case of an error,
status code `405` with an explaining error message is returned.
Errors return status code `405` with an explanatory error message.
## Delete a tag
@ -172,10 +175,10 @@ DELETE /projects/:id/repository/tags/:tag_name
Parameters:
| Attribute | Type | Required | Description |
| ---------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `tag_name` | string | yes | The name of a tag |
| Attribute | Type | Required | Description |
|------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `tag_name` | string | yes | The name of a tag. |
## Get X.509 signature of a tag
@ -190,13 +193,14 @@ GET /projects/:id/repository/tags/:tag_name/signature
Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `tag_name` | string | yes | The name of a tag. |
| Attribute | Type | Required | Description |
|------------|-------------------|----------|-------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user. |
| `tag_name` | string | yes | The name of a tag. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/repository/tags/v1.1.1/signature"
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/1/repository/tags/v1.1.1/signature"
```
Example response if tag is X.509 signed: