diff --git a/Gemfile b/Gemfile index 65b23684c57..af858e06f05 100644 --- a/Gemfile +++ b/Gemfile @@ -167,7 +167,7 @@ gem 'asciidoctor', '~> 2.0.10' gem 'asciidoctor-include-ext', '~> 0.4.0', require: false gem 'asciidoctor-plantuml', '~> 0.0.12' gem 'asciidoctor-kroki', '~> 0.5.0', require: false -gem 'rouge', '~> 3.27.0' +gem 'rouge', '~> 3.29.0' gem 'truncato', '~> 0.7.11' gem 'bootstrap_form', '~> 4.2.0' gem 'nokogiri', '~> 1.13.6' diff --git a/Gemfile.lock b/Gemfile.lock index d84ff5769f4..13468d804a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1090,7 +1090,7 @@ GEM rexml (3.2.5) rinku (2.0.0) rotp (6.2.0) - rouge (3.27.0) + rouge (3.29.0) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) @@ -1663,7 +1663,7 @@ DEPENDENCIES responders (~> 3.0) retriable (~> 3.1.2) rexml (~> 3.2.5) - rouge (~> 3.27.0) + rouge (~> 3.29.0) rqrcode-rails3 (~> 0.1.7) rspec-benchmark (~> 0.6.0) rspec-parameterized diff --git a/app/models/integration.rb b/app/models/integration.rb index 47ed0632b54..c35713b4fc8 100644 --- a/app/models/integration.rb +++ b/app/models/integration.rb @@ -499,10 +499,7 @@ class Integration < ApplicationRecord end def api_field_names - fields - .reject { _1[:type] == 'password' } - .pluck(:name) - .grep_v(/password|token|key/) + fields.reject { _1[:type] == 'password' }.pluck(:name) end def global_fields diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 3507f4574ab..d5c22d9b1f2 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _("Projects") - page_title _("Projects") +- @content_class = "limit-container-width" unless fluid_layout .card.gl-mt-3 .card-header diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 2960b236264..3b546888375 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -50,7 +50,9 @@ = render 'shared/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files hereā€¦'), current_text: @release_description, qa_selector: 'release_notes_field' = render 'shared/notes/hints' .form-actions.gl-display-flex - = button_tag s_('TagsPage|Create tag'), class: 'gl-button btn btn-confirm gl-mr-3', data: { qa_selector: "create_tag_button" } - = link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'gl-button btn btn-default btn-cancel' + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'gl-mr-3', data: { qa_selector: "create_tag_button" }, type: 'submit' }) do + = s_('TagsPage|Create tag') + = render Pajamas::ButtonComponent.new(href: project_tags_path(@project)) do + = s_('TagsPage|Cancel') -# haml-lint:disable InlineJavaScript %script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 74541222fbf..4d49aa2c344 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -19,8 +19,7 @@ button_options: { class: 'remove-priority has-tooltip', 'title': _('Remove priority'), 'aria_label': _('Deprioritize label'), data: { placement: 'bottom' } }) - if can?(current_user, :admin_label, label) %li.gl-display-inline-block - = link_to label.edit_path, class: 'btn gl-button btn-default-tertiary btn-sm edit has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do - = sprite_icon('pencil') + = render Pajamas::ButtonComponent.new(href: label.edit_path, category: :tertiary, icon: 'pencil', button_options: { class: 'edit has-tooltip', 'title': _('Edit'), 'aria_label': _('Edit'), data: { placement: 'bottom' } }) - if can?(current_user, :admin_label, label) %li.gl-display-inline-block .dropdown @@ -48,10 +47,9 @@ %button.js-unsubscribe-button.gl-button.btn.btn-default.gl-w-full{ class: ('hidden' if status.unsubscribed?), data: { url: toggle_subscription_path, toggle: 'tooltip' }, title: tooltip_title } %span.gl-button-text= _('Unsubscribe') .dropdown.dropdown-group-label{ class: ('hidden' unless status.unsubscribed?) } - %button.gl-button.btn.btn-default.gl-w-full{ data: { toggle: 'dropdown' } } - %span.gl-button-text - = _('Subscribe') - = sprite_icon('chevron-down') + = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-w-full', data: { toggle: 'dropdown' } }) do + = _('Subscribe') + = sprite_icon('chevron-down') .dropdown-menu.dropdown-open-left %ul %li diff --git a/doc/api/deploy_keys.md b/doc/api/deploy_keys.md index 7f69d6933c1..adeda014af0 100644 --- a/doc/api/deploy_keys.md +++ b/doc/api/deploy_keys.md @@ -69,7 +69,7 @@ Example response: ] ``` -## List project deploy keys +## List deploy keys for project Get a list of a project's deploy keys. @@ -106,6 +106,62 @@ Example response: ] ``` +## List project deploy keys for user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88917) in GitLab 15.1. + +Get a list of a specified user (requestee) and the authenticated user's (requester) common [project deploy keys](../user/project/deploy_keys/index.md#scope). It lists only the **enabled project keys from the common projects of requester and requestee**. + +```plaintext +GET /users/:id_or_username/project_deploy_keys +``` + +Parameters: + +| Attribute | Type | Required | Description | +|------------------- |--------|----------|------------------------------------------------------------------- | +| `id_or_username` | string | yes | The ID or username of the user to get the project deploy keys for. | + +```json +[ + { + "id": 1, + "title": "Key A", + "created_at": "2022-05-30T12:28:27.855Z", + "expires_at": null, + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTEVaAtU5wiVducsOa01InRFf7QSTxoAm6Xy0PGv/k48M6xCALa9nY+BzlOv47jUT57 Key", + "fingerprint": "60:8e:10:f0:6a:82:c8:29:5f:bf:c0:38:72:00:6f:8f" + }, + { + "id": 2, + "title": "Key B", + "created_at": "2022-05-30T13:34:56.219Z", + "expires_at": null, + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "fingerprint": "75:33:44:7e:55:84:dd:70:29:a3:8e:a3:c0:b9:8b:65" + } +] +``` + +```shell +curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/users/20/project_deploy_keys" +``` + +Example response: + +```json +[ + { + "id": 1, + "title": "Key A", + "created_at": "2022-05-30T12:28:27.855Z", + "expires_at": "2022-10-30T12:28:27.855Z", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTEVaAtU5wiVducsOa01InRFf7QSTxoAm6Xy0PGv/k48M6xCALa9nY+BzlOv47jUT57 Key", + "fingerprint": "60:8e:10:f0:6a:82:c8:29:5f:bf:c0:38:72:00:6f:8f" + } +] +``` + ## Get a single deploy key Get a single key. diff --git a/doc/ci/runners/index.md b/doc/ci/runners/index.md index 038bda4ab09..729de4d99d3 100644 --- a/doc/ci/runners/index.md +++ b/doc/ci/runners/index.md @@ -12,7 +12,7 @@ No configuration is required. Your jobs can run on: - [Linux runners](saas/linux_saas_runner.md). - [Windows runners](saas/windows_saas_runner.md) ([Beta](../../policy/alpha-beta-support.md#beta-features)). -- [macOS runners](saas/macos_saas_runner.md) ([Beta](../../policy/alpha-beta-support.md#beta-features)). +- [macOS runners](saas/macos_saas_runner.md) ([Limited Availability](../../policy/alpha-beta-support.md#limited-availability-la)). The number of minutes you can use on these runners depends on the [maximum number of CI/CD minutes](../pipelines/cicd_minutes.md) diff --git a/doc/ci/runners/saas/macos_saas_runner.md b/doc/ci/runners/saas/macos_saas_runner.md index 3c79292f03a..65404c89f9a 100644 --- a/doc/ci/runners/saas/macos_saas_runner.md +++ b/doc/ci/runners/saas/macos_saas_runner.md @@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w # SaaS runners on macOS (Limited Availability) **(PREMIUM SAAS)** -SaaS runners on macOS are in [Beta](../../../policy/alpha-beta-support.md#limited-availability-la) for approved open source programs and customers in Premium and Ultimate plans. +SaaS runners on macOS are in [Limited Availability](../../../policy/alpha-beta-support.md#limited-availability-la) for approved open source programs and customers in Premium and Ultimate plans. SaaS runners on macOS provide an on-demand macOS build environment integrated with GitLab SaaS [CI/CD](../../../ci/index.md). diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index 324d1a6c6ef..7badd7f76fa 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -23,7 +23,8 @@ Each table of GitLab needs to have a `gitlab_schema` assigned: - `gitlab_main`: describes all tables that are being stored in the `main:` database (for example, like `projects`, `users`). - `gitlab_ci`: describes all CI tables that are being stored in the `ci:` database (for example, `ci_pipelines`, `ci_builds`). -- `gitlab_shared`: describe all application tables that contain data across all decomposed databases (for example, `loose_foreign_keys_deleted_records`). +- `gitlab_shared`: describe all application tables that contain data across all decomposed databases (for example, `loose_foreign_keys_deleted_records`) for models that inherit from `Gitlab::Database::SharedModel`. +- `gitlab_internal`: describe all internal tables of Rails and PostgreSQL (for example, `ar_internal_metadata`, `schema_migrations`, `pg_*`). - `...`: more schemas to be introduced with additional decomposed databases The usage of schema enforces the base class to be used: @@ -44,10 +45,8 @@ This is used as a primary source of classification for: ### The special purpose of `gitlab_shared` -`gitlab_shared` is a special case describing tables or views that by design contain data across -all decomposed databases. This does describe application-defined tables (like `loose_foreign_keys_deleted_records`), -Rails-defined tables (like `schema_migrations` or `ar_internal_metadata` as well as internal PostgreSQL tables -(for example, `pg_attribute`). +`gitlab_shared` is a special case that describes tables or views that, by design, contain data across +all decomposed databases. This classification describes application-defined tables (like `loose_foreign_keys_deleted_records`). **Be careful** to use `gitlab_shared` as it requires special handling while accessing data. Since `gitlab_shared` shares not only structure but also data, the application needs to be written in a way @@ -62,6 +61,11 @@ end As such, migrations modifying data of `gitlab_shared` tables are expected to run across all decomposed databases. +### The special purpose of `gitlab_internal` + +`gitlab_internal` describes Rails-defined tables (like `schema_migrations` or `ar_internal_metadata`), as well as internal PostgreSQL tables (for example, `pg_attribute`). Its primary purpose is to [support other databases](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85842#note_943453682), like Geo, that +might be missing some of those application-defined `gitlab_shared` tables (like `loose_foreign_keys_deleted_records`), but are valid Rails databases. + ## Migrations Read [Migrations for Multiple Databases](migrations_for_multiple_databases.md). diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md index 9c605ca5b75..08e2dcd2e7e 100644 --- a/doc/user/application_security/dependency_scanning/index.md +++ b/doc/user/application_security/dependency_scanning/index.md @@ -194,8 +194,16 @@ table.supported-languages ul { Java - 8, 11, 13, 14, 15, 16, or 17 - Gradle1 + + 8, + 11, + 131, + 141, + 151, + 161, + or 17 + + Gradle2