Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
b7eed2ea49
commit
7fa274753d
84 changed files with 332 additions and 157 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Range } from 'monaco-editor';
|
||||
import { waitForCSSLoaded } from '~/helpers/startup_css_helper';
|
||||
import { ERROR_INSTANCE_REQUIRED_FOR_EXTENSION, EDITOR_TYPE_CODE } from '../constants';
|
||||
|
||||
const hashRegexp = new RegExp('#?L', 'g');
|
||||
|
@ -25,11 +26,18 @@ export class EditorLiteExtension {
|
|||
if (instance.getEditorType && instance.getEditorType() === EDITOR_TYPE_CODE) {
|
||||
EditorLiteExtension.setupLineLinking(instance);
|
||||
}
|
||||
EditorLiteExtension.deferRerender(instance);
|
||||
} else if (Object.entries(options).length) {
|
||||
throw new Error(ERROR_INSTANCE_REQUIRED_FOR_EXTENSION);
|
||||
}
|
||||
}
|
||||
|
||||
static deferRerender(instance) {
|
||||
waitForCSSLoaded(() => {
|
||||
instance.layout();
|
||||
});
|
||||
}
|
||||
|
||||
static highlightLines(instance) {
|
||||
const { hash } = window.location;
|
||||
if (!hash) {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
- register_2fa_token = _('We recommend cloud-based mobile authenticator apps such as Authy, Duo Mobile, and LastPass. They can restore access if you lose your hardware device.')
|
||||
= register_2fa_token.html_safe
|
||||
.row.gl-mb-3
|
||||
.col-md-4
|
||||
.col-md-4.gl-pt-2{ style: 'background: #fff' }
|
||||
= raw @qr_code
|
||||
.col-md-8
|
||||
.account-well
|
||||
|
|
|
@ -23,6 +23,6 @@
|
|||
.clearable-input
|
||||
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date'
|
||||
= sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200')
|
||||
= submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-3", data: { qa_selector: 'invite_member_button' }
|
||||
= submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-2", data: { qa_selector: 'invite_member_button' }
|
||||
- if can_import_members
|
||||
= link_to _("Import"), import_path, class: "gl-button btn btn-default", title: _("Import members from another project")
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Decrease space between invite and import members buttons to align with Pajamas
|
||||
spacing
|
||||
merge_request: 61396
|
||||
author:
|
||||
type: other
|
5
changelogs/unreleased/dmishunov-editor-fix-rendering.yml
Normal file
5
changelogs/unreleased/dmishunov-editor-fix-rendering.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Reset Source Editor's layout after Startup CSS
|
||||
merge_request: 61426
|
||||
author:
|
||||
type: fixed
|
|
@ -10,7 +10,7 @@ status: data_available
|
|||
milestone: "8.10"
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/557
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ee
|
||||
- ce
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::HostnameMetric'
|
||||
distribution:
|
||||
- ce
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category:
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: ''
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
},
|
||||
"data_source": {
|
||||
"type": "string",
|
||||
"enum": ["database", "redis", "redis_hll", "prometheus", "ruby"]
|
||||
"enum": ["database", "redis", "redis_hll", "prometheus", "system"]
|
||||
},
|
||||
"instrumentation_class": {
|
||||
"type": "string",
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ee
|
||||
- ce
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: auto_devops
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: runner
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: authentication_and_authorization
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: onboarding
|
|||
value_type: number
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: web_firewall
|
|||
value_type: boolean
|
||||
status: deprecated
|
||||
time_frame: none
|
||||
data_source: database
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: collection
|
|||
value_type: string
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: global_search
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: integrations
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -9,7 +9,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -8,7 +8,7 @@ product_category: operational_metrics
|
|||
value_type: boolean
|
||||
status: data_available
|
||||
time_frame: none
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -5,10 +5,10 @@ product_section: enablement
|
|||
product_stage: enablement
|
||||
product_group: group::memory
|
||||
product_category: operational_metrics
|
||||
value_type: number
|
||||
value_type: string
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
|
@ -8,7 +8,7 @@ product_category: ''
|
|||
value_type: number
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
|
@ -8,7 +8,7 @@ product_category:
|
|||
value_type: number
|
||||
status: data_available
|
||||
time_frame: all
|
||||
data_source:
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
tier:
|
|
@ -10,7 +10,7 @@ status: data_available
|
|||
milestone: "13.10"
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54778
|
||||
time_frame: none
|
||||
data_source: ruby
|
||||
data_source: system
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
|
|
|
@ -4466,6 +4466,7 @@ These keywords are supported:
|
|||
- [`ref`](#releaseref) (optional)
|
||||
- [`milestones`](#releasemilestones) (optional)
|
||||
- [`released_at`](#releasereleased_at) (optional)
|
||||
- [`assets:links`](#releaseassetslinks) (optional)
|
||||
|
||||
The release is created only if the job processes without error. If the Rails API
|
||||
returns an error during release creation, the `release` job fails.
|
||||
|
@ -4674,6 +4675,26 @@ defined. Should be enclosed in quotes and expressed in ISO 8601 format.
|
|||
released_at: '2021-03-15T08:00:00Z'
|
||||
```
|
||||
|
||||
#### `release:assets:links`
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/271454) in GitLab 13.12.
|
||||
|
||||
Include [asset links](../../user/project/releases/index.md#release-assets) in the release.
|
||||
|
||||
NOTE:
|
||||
Requires `release-cli` version v0.4.0 or higher.
|
||||
|
||||
```yaml
|
||||
assets:
|
||||
links:
|
||||
- name: 'asset1'
|
||||
url: 'https://example.com/assets/1'
|
||||
- name: 'asset2'
|
||||
url: 'https://example.com/assets/2'
|
||||
filepath: '/pretty/url/1' # optional
|
||||
link_type: 'other' # optional
|
||||
```
|
||||
|
||||
#### Complete example for `release`
|
||||
|
||||
If you combine the previous examples for `release`, you get two options, depending on how you generate the
|
||||
|
@ -4700,6 +4721,14 @@ tags. You can't use these options together, so choose one:
|
|||
- 'm2'
|
||||
- 'm3'
|
||||
released_at: '2020-07-15T08:00:00Z' # Optional, is auto generated if not defined, or can use a variable.
|
||||
assets: # Optional, multiple asset links
|
||||
links:
|
||||
- name: 'asset1'
|
||||
url: 'https://example.com/assets/1'
|
||||
- name: 'asset2'
|
||||
url: 'https://example.com/assets/2'
|
||||
filepath: '/pretty/url/1' # optional
|
||||
link_type: 'other' # optional
|
||||
```
|
||||
|
||||
- To create a release automatically when commits are pushed or merged to the default branch,
|
||||
|
@ -4746,6 +4775,14 @@ tags. You can't use these options together, so choose one:
|
|||
- 'm2'
|
||||
- 'm3'
|
||||
released_at: '2020-07-15T08:00:00Z' # Optional, is auto generated if not defined, or can use a variable.
|
||||
assets:
|
||||
links:
|
||||
- name: 'asset1'
|
||||
url: 'https://example.com/assets/1'
|
||||
- name: 'asset2'
|
||||
url: 'https://example.com/assets/2'
|
||||
filepath: '/pretty/url/1' # optional
|
||||
link_type: 'other' # optional
|
||||
```
|
||||
|
||||
#### Release assets as Generic packages
|
||||
|
@ -4763,7 +4800,7 @@ You can also call the `release-cli` directly from a `script` entry.
|
|||
For example, if you use the YAML described previously:
|
||||
|
||||
```shell
|
||||
release-cli create --name "Release $CI_COMMIT_SHA" --description "Created using the release-cli $EXTRA_DESCRIPTION" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --ref "$CI_COMMIT_SHA" --released-at "2020-07-15T08:00:00Z" --milestone "m1" --milestone "m2" --milestone "m3"
|
||||
release-cli create --name "Release $CI_COMMIT_SHA" --description "Created using the release-cli $EXTRA_DESCRIPTION" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --ref "$CI_COMMIT_SHA" --released-at "2020-07-15T08:00:00Z" --milestone "m1" --milestone "m2" --milestone "m3" --assets-link "{\"name\":\"asset1\",\"url\":\"https://example.com/assets/1\",\"link_type\":\"other\"}
|
||||
```
|
||||
|
||||
### `secrets`
|
||||
|
|
|
@ -6494,7 +6494,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
TBD
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183248_pg_system_id.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216183248_pg_system_id.yml)
|
||||
|
||||
Group: `group::distribution`
|
||||
|
||||
|
@ -6590,7 +6590,7 @@ Tiers: `free`
|
|||
|
||||
Missing description
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183241_filesystems.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216183241_filesystems.yml)
|
||||
|
||||
Group: ``
|
||||
|
||||
|
@ -6986,7 +6986,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
What Object Storage provider has been configured for Artifacts
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180843_provider.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180843_provider.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
@ -7046,7 +7046,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
What Object Storage provider has been configured for External Diffs
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180852_provider.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180852_provider.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
@ -7106,7 +7106,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
What Object Storage provider has been configured for LFS
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180902_provider.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180902_provider.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
@ -7166,7 +7166,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
What Object Storage provider has been configured for Packages
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180920_provider.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180920_provider.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
@ -7178,7 +7178,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
Whether Object Storage is enabled for Uploads
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180903_enabled.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180903_enabled.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
@ -7226,7 +7226,7 @@ Tiers: `free`, `premium`, `ultimate`
|
|||
|
||||
What Object Storage provider has been configured for Uploads
|
||||
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180911_provider.yml)
|
||||
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210216180911_provider.yml)
|
||||
|
||||
Group: `group::memory`
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Each metric is defined in a separate YAML file consisting of a number of fields:
|
|||
| `value_type` | yes | `string`; one of [`string`, `number`, `boolean`, `object`](https://json-schema.org/understanding-json-schema/reference/type.html). |
|
||||
| `status` | yes | `string`; [status](#metric-statuses) of the metric, may be set to `data_available`, `implemented`, `not_used`, `deprecated`, `removed`. |
|
||||
| `time_frame` | yes | `string`; may be set to a value like `7d`, `28d`, `all`, `none`. |
|
||||
| `data_source` | yes | `string`; may be set to a value like `database`, `redis`, `redis_hll`, `prometheus`, `ruby`. |
|
||||
| `data_source` | yes | `string`; may be set to a value like `database`, `redis`, `redis_hll`, `prometheus`, `system`. |
|
||||
| `instrumentation_class` | no | `string`; [the class that implements the metric](metrics_instrumentation.md). |
|
||||
| `distribution` | yes | `array`; may be set to one of `ce, ee` or `ee`. The [distribution](https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/#definitions) where the tracked feature is available. |
|
||||
| `tier` | yes | `array`; may be set to one of `free, premium, ultimate`, `premium, ultimate` or `ultimate`. The [tier]( https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/) where the tracked feature is available. |
|
||||
|
@ -121,10 +121,10 @@ only the single prompt to be replaced by the person working with metrics YAML.
|
|||
`{subject}_{verb}{ing|ed}_{object}`, such as `user_creating_epics`, `users_triggering_security_scans`,
|
||||
or `merge_requests_viewed_in_single_file_mode`
|
||||
|
||||
#### Metric with `data_source: prometheus` or `ruby`
|
||||
#### Metric with `data_source: prometheus` or `system`
|
||||
|
||||
For metrics instrumented with Prometheus or Ruby, the suggested name includes only
|
||||
the single prompt by person working with metrics YAML.
|
||||
For metrics instrumented with Prometheus or coming from the operating system,
|
||||
the suggested name includes only the single prompt by person working with metrics YAML.
|
||||
|
||||
- **Prompt**: `<please fill metric name>`
|
||||
- **Final metric name**: Due to the variety of cases that can apply to this kind of metric,
|
||||
|
|
|
@ -271,10 +271,15 @@ Release note descriptions are unrelated. Description supports [Markdown](../../m
|
|||
|
||||
### Release assets
|
||||
|
||||
You can add the following types of assets to each release:
|
||||
A release contains the following types of assets:
|
||||
|
||||
- [Source code](#source-code)
|
||||
- [Links](#links)
|
||||
- [Permanent links to release assets](#permanent-links-to-release-assets)
|
||||
|
||||
#### Source code
|
||||
|
||||
GitLab automatically generates `zip`, `tar.gz`, `tar.bz2`, and `tar`
|
||||
archived source code from the given Git tag. These are read-only assets.
|
||||
|
||||
#### Permanent links to release assets
|
||||
|
||||
|
@ -285,9 +290,21 @@ GitLab always redirects this URL to the actual asset
|
|||
location, so even if the assets move to a different location, you can continue
|
||||
to use the same URL. This is defined during [link creation](../../../api/releases/links.md#create-a-link) or [updating](../../../api/releases/links.md#update-a-link).
|
||||
|
||||
Each asset has a name, a URL of the *actual* asset location, and optionally, a
|
||||
`filepath` parameter, which, if you specify it, creates a URL pointing
|
||||
to the asset for the Release. The format of the URL is:
|
||||
Each asset has a `name`, a `url` of the *actual* asset location, and optionally,
|
||||
`filepath` and `link_type` parameters.
|
||||
|
||||
A `filepath` creates a URL pointing to the asset for the Release.
|
||||
|
||||
The `link_type` parameter accepts one of the following four values:
|
||||
|
||||
- `runbook`
|
||||
- `package`
|
||||
- `image`
|
||||
- `other` (default)
|
||||
|
||||
This field has no effect on the URL and it's only used for visual purposes in the Releases page of your project.
|
||||
|
||||
The format of the URL is:
|
||||
|
||||
```plaintext
|
||||
https://host/namespace/project/releases/:release/downloads/:filepath
|
||||
|
@ -300,7 +317,8 @@ namespace and `gitlab-runner` project on `gitlab.com`, for example:
|
|||
{
|
||||
"name": "linux amd64",
|
||||
"filepath": "/binaries/gitlab-runner-linux-amd64",
|
||||
"url": "https://gitlab-runner-downloads.s3.amazonaws.com/v11.9.0-rc2/binaries/gitlab-runner-linux-amd64"
|
||||
"url": "https://gitlab-runner-downloads.s3.amazonaws.com/v11.9.0-rc2/binaries/gitlab-runner-linux-amd64",
|
||||
"link_type": "other"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -312,11 +330,6 @@ https://gitlab.com/gitlab-org/gitlab-runner/releases/v11.9.0-rc2/downloads/binar
|
|||
|
||||
The physical location of the asset can change at any time and the direct link remains unchanged.
|
||||
|
||||
### Source code
|
||||
|
||||
GitLab automatically generates `zip`, `tar.gz`, `tar.bz2` and `tar`
|
||||
archived source code from the given Git tag. These are read-only assets.
|
||||
|
||||
### Links
|
||||
|
||||
A link is any URL which can point to whatever you like: documentation, built
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
# This class was already nested this way before moving to a separate file
|
||||
class Feature
|
||||
class ActiveSupportCacheStoreAdapter < Flipper::Adapters::ActiveSupportCacheStore
|
||||
# This patch represents https://github.com/jnunemaker/flipper/pull/512. In
|
||||
# Flipper 0.21.0 and later, we can remove this and just pass `write_through:
|
||||
# true` to the constructor in `Feature.build_flipper_instance`.
|
||||
|
||||
extend ::Gitlab::Utils::Override
|
||||
|
||||
override :enable
|
||||
|
|
|
@ -40,24 +40,24 @@ module Gitlab
|
|||
TRANSLATION_LEVELS = {
|
||||
'bg' => 1,
|
||||
'cs_CZ' => 1,
|
||||
'de' => 20,
|
||||
'de' => 19,
|
||||
'en' => 100,
|
||||
'eo' => 1,
|
||||
'es' => 44,
|
||||
'es' => 41,
|
||||
'fil_PH' => 1,
|
||||
'fr' => 14,
|
||||
'gl_ES' => 1,
|
||||
'id_ID' => 0,
|
||||
'it' => 3,
|
||||
'ja' => 49,
|
||||
'ko' => 15,
|
||||
'it' => 2,
|
||||
'ja' => 45,
|
||||
'ko' => 14,
|
||||
'nl_NL' => 1,
|
||||
'pl_PL' => 1,
|
||||
'pt_BR' => 23,
|
||||
'ru' => 34,
|
||||
'tr_TR' => 18,
|
||||
'uk' => 46,
|
||||
'zh_CN' => 78,
|
||||
'pt_BR' => 22,
|
||||
'ru' => 32,
|
||||
'tr_TR' => 17,
|
||||
'uk' => 43,
|
||||
'zh_CN' => 72,
|
||||
'zh_HK' => 3,
|
||||
'zh_TW' => 4
|
||||
}.freeze
|
||||
|
|
|
@ -19,7 +19,7 @@ module Sidebars
|
|||
|
||||
override :link
|
||||
def link
|
||||
return cycle_analytics_menu_item.link if cycle_analytics_menu_item
|
||||
return cycle_analytics_menu_item.link if cycle_analytics_menu_item.render?
|
||||
|
||||
renderable_items.first.link
|
||||
end
|
||||
|
@ -44,9 +44,11 @@ module Sidebars
|
|||
private
|
||||
|
||||
def ci_cd_analytics_menu_item
|
||||
return if context.project.empty_repo?
|
||||
return unless context.project.feature_available?(:builds, context.current_user)
|
||||
return unless can?(context.current_user, :read_build, context.project)
|
||||
if !context.project.feature_available?(:builds, context.current_user) ||
|
||||
!can?(context.current_user, :read_build, context.project) ||
|
||||
context.project.empty_repo?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :ci_cd_analytics)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('CI/CD'),
|
||||
|
@ -57,7 +59,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def repository_analytics_menu_item
|
||||
return if context.project.empty_repo?
|
||||
if context.project.empty_repo?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :repository_analytics)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Repository'),
|
||||
|
@ -70,7 +74,9 @@ module Sidebars
|
|||
|
||||
def cycle_analytics_menu_item
|
||||
strong_memoize(:cycle_analytics_menu_item) do
|
||||
next unless can?(context.current_user, :read_cycle_analytics, context.project)
|
||||
unless can?(context.current_user, :read_cycle_analytics, context.project)
|
||||
next ::Sidebars::NilMenuItem.new(item_id: :cycle_analytics)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Value Stream'),
|
||||
|
|
|
@ -65,7 +65,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def pipelines_editor_menu_item
|
||||
return unless context.can_view_pipeline_editor
|
||||
unless context.can_view_pipeline_editor
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :pipelines_editor)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: s_('Pipelines|Editor'),
|
||||
|
@ -86,7 +88,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def artifacts_menu_item
|
||||
return unless Feature.enabled?(:artifacts_management_page, context.project)
|
||||
unless Feature.enabled?(:artifacts_management_page, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :artifacts)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Artifacts'),
|
||||
|
|
|
@ -29,8 +29,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def graph_menu_item
|
||||
return unless can?(context.current_user, :download_code, context.project)
|
||||
return if context.project.empty_repo?
|
||||
if !can?(context.current_user, :download_code, context.project) ||
|
||||
context.project.empty_repo?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :graph)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Graph'),
|
||||
|
@ -42,7 +44,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def new_issue_menu_item
|
||||
return unless can?(context.current_user, :read_issue, context.project)
|
||||
unless can?(context.current_user, :read_issue, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :new_issue)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Create a new issue'),
|
||||
|
@ -54,7 +58,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def jobs_menu_item
|
||||
return unless can?(context.current_user, :read_build, context.project)
|
||||
unless can?(context.current_user, :read_build, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :jobs)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Jobs'),
|
||||
|
@ -66,8 +72,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def commits_menu_item
|
||||
return unless can?(context.current_user, :download_code, context.project)
|
||||
return if context.project.empty_repo?
|
||||
if !can?(context.current_user, :download_code, context.project) ||
|
||||
context.project.empty_repo?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :commits)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Commits'),
|
||||
|
@ -79,7 +87,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def issue_boards_menu_item
|
||||
return unless can?(context.current_user, :read_issue, context.project)
|
||||
unless can?(context.current_user, :read_issue, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :issue_boards)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Issue Boards'),
|
||||
|
|
|
@ -41,7 +41,9 @@ module Sidebars
|
|||
private
|
||||
|
||||
def kubernetes_menu_item
|
||||
return unless can?(context.current_user, :read_cluster, context.project)
|
||||
unless can?(context.current_user, :read_cluster, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :kubernetes)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Kubernetes clusters'),
|
||||
|
@ -67,7 +69,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def serverless_menu_item
|
||||
return unless can?(context.current_user, :read_cluster, context.project)
|
||||
unless can?(context.current_user, :read_cluster, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :serverless)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Serverless platform'),
|
||||
|
@ -78,7 +82,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def terraform_menu_item
|
||||
return unless can?(context.current_user, :read_terraform_state, context.project)
|
||||
unless can?(context.current_user, :read_terraform_state, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :terraform)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Terraform'),
|
||||
|
|
|
@ -58,7 +58,9 @@ module Sidebars
|
|||
private
|
||||
|
||||
def metrics_dashboard_menu_item
|
||||
return unless can?(context.current_user, :metrics_dashboard, context.project)
|
||||
unless can?(context.current_user, :metrics_dashboard, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :metrics)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Metrics'),
|
||||
|
@ -70,8 +72,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def logs_menu_item
|
||||
return unless can?(context.current_user, :read_environment, context.project)
|
||||
return unless can?(context.current_user, :read_pod_logs, context.project)
|
||||
if !can?(context.current_user, :read_environment, context.project) ||
|
||||
!can?(context.current_user, :read_pod_logs, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :logs)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Logs'),
|
||||
|
@ -82,8 +86,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def tracing_menu_item
|
||||
return unless can?(context.current_user, :read_environment, context.project)
|
||||
return unless can?(context.current_user, :admin_project, context.project)
|
||||
if !can?(context.current_user, :read_environment, context.project) ||
|
||||
!can?(context.current_user, :admin_project, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :tracing)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Tracing'),
|
||||
|
@ -94,7 +100,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def error_tracking_menu_item
|
||||
return unless can?(context.current_user, :read_sentry_issue, context.project)
|
||||
unless can?(context.current_user, :read_sentry_issue, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :error_tracking)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Error Tracking'),
|
||||
|
@ -105,7 +113,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def alert_management_menu_item
|
||||
return unless can?(context.current_user, :read_alert_management_alert, context.project)
|
||||
unless can?(context.current_user, :read_alert_management_alert, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :alert_management)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Alerts'),
|
||||
|
@ -116,7 +126,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def incidents_menu_item
|
||||
return unless can?(context.current_user, :read_issue, context.project)
|
||||
unless can?(context.current_user, :read_issue, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :incidents)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Incidents'),
|
||||
|
@ -127,8 +139,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def serverless_menu_item
|
||||
return if Feature.enabled?(:sidebar_refactor, context.current_user)
|
||||
return unless can?(context.current_user, :read_cluster, context.project)
|
||||
if Feature.enabled?(:sidebar_refactor, context.current_user) ||
|
||||
!can?(context.current_user, :read_cluster, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :serverless)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Serverless'),
|
||||
|
@ -139,8 +153,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def terraform_menu_item
|
||||
return if Feature.enabled?(:sidebar_refactor, context.current_user)
|
||||
return unless can?(context.current_user, :read_terraform_state, context.project)
|
||||
if Feature.enabled?(:sidebar_refactor, context.current_user) ||
|
||||
!can?(context.current_user, :read_terraform_state, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :terraform)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Terraform'),
|
||||
|
@ -151,8 +167,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def kubernetes_menu_item
|
||||
return if Feature.enabled?(:sidebar_refactor, context.current_user)
|
||||
return unless can?(context.current_user, :read_cluster, context.project)
|
||||
if Feature.enabled?(:sidebar_refactor, context.current_user) ||
|
||||
!can?(context.current_user, :read_cluster, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :kubernetes)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Kubernetes'),
|
||||
|
@ -178,7 +196,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def environments_menu_item
|
||||
return unless can?(context.current_user, :read_environment, context.project)
|
||||
unless can?(context.current_user, :read_environment, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :environments)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Environments'),
|
||||
|
@ -190,7 +210,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def feature_flags_menu_item
|
||||
return unless can?(context.current_user, :read_feature_flag, context.project)
|
||||
unless can?(context.current_user, :read_feature_flag, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :feature_flags)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Feature Flags'),
|
||||
|
@ -202,8 +224,10 @@ module Sidebars
|
|||
end
|
||||
|
||||
def product_analytics_menu_item
|
||||
return if Feature.disabled?(:product_analytics, context.project)
|
||||
return unless can?(context.current_user, :read_product_analytics, context.project)
|
||||
if Feature.disabled?(:product_analytics, context.project) ||
|
||||
!can?(context.current_user, :read_product_analytics, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :product_analytics)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Product Analytics'),
|
||||
|
|
|
@ -31,8 +31,9 @@ module Sidebars
|
|||
private
|
||||
|
||||
def packages_registry_menu_item
|
||||
return unless ::Gitlab.config.packages.enabled
|
||||
return unless can?(context.current_user, :read_package, context.project)
|
||||
if !::Gitlab.config.packages.enabled || !can?(context.current_user, :read_package, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :packages_registry)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Package Registry'),
|
||||
|
@ -44,8 +45,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def container_registry_menu_item
|
||||
return unless ::Gitlab.config.registry.enabled
|
||||
return unless can?(context.current_user, :read_container_image, context.project)
|
||||
if !::Gitlab.config.registry.enabled || !can?(context.current_user, :read_container_image, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :container_registry)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Container Registry'),
|
||||
|
@ -56,7 +58,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def infrastructure_registry_menu_item
|
||||
return if Feature.disabled?(:infrastructure_registry_page, context.current_user)
|
||||
if Feature.disabled?(:infrastructure_registry_page, context.current_user)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :infrastructure_registry)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Infrastructure Registry'),
|
||||
|
|
|
@ -83,8 +83,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def releases_menu_item
|
||||
return unless can?(context.current_user, :read_release, context.project)
|
||||
return if context.project.empty_repo?
|
||||
if !can?(context.current_user, :read_release, context.project) || context.project.empty_repo?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :releases)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Releases'),
|
||||
|
|
|
@ -34,7 +34,9 @@ module Sidebars
|
|||
|
||||
def configuration_menu_item
|
||||
strong_memoize(:configuration_menu_item) do
|
||||
next unless render_configuration_menu_item?
|
||||
unless render_configuration_menu_item?
|
||||
next ::Sidebars::NilMenuItem.new(item_id: :configuration)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Configuration'),
|
||||
|
|
|
@ -73,7 +73,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def access_tokens_menu_item
|
||||
return unless can?(context.current_user, :read_resource_access_tokens, context.project)
|
||||
unless can?(context.current_user, :read_resource_access_tokens, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :access_tokens)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Access Tokens'),
|
||||
|
@ -93,8 +95,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def ci_cd_menu_item
|
||||
return if context.project.archived?
|
||||
return unless context.project.feature_available?(:builds, context.current_user)
|
||||
if context.project.archived? || !context.project.feature_available?(:builds, context.current_user)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :ci_cd)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('CI/CD'),
|
||||
|
@ -105,8 +108,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def operations_menu_item
|
||||
return if context.project.archived?
|
||||
return unless can?(context.current_user, :admin_operations, context.project)
|
||||
if context.project.archived? || !can?(context.current_user, :admin_operations, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :operations)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Operations'),
|
||||
|
@ -117,7 +121,9 @@ module Sidebars
|
|||
end
|
||||
|
||||
def pages_menu_item
|
||||
return unless context.project.pages_available?
|
||||
unless context.project.pages_available?
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :pages)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Pages'),
|
||||
|
@ -128,9 +134,11 @@ module Sidebars
|
|||
end
|
||||
|
||||
def packages_and_registries_menu_item
|
||||
return unless Gitlab.config.registry.enabled
|
||||
return if Feature.disabled?(:sidebar_refactor, context.current_user)
|
||||
return unless can?(context.current_user, :destroy_container_image, context.project)
|
||||
if !Gitlab.config.registry.enabled ||
|
||||
Feature.disabled?(:sidebar_refactor, context.current_user) ||
|
||||
!can?(context.current_user, :destroy_container_image, context.project)
|
||||
return ::Sidebars::NilMenuItem.new(item_id: :packages_and_registries)
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Packages & Registries'),
|
||||
|
|
|
@ -5043,7 +5043,7 @@ msgstr ""
|
|||
msgid "BillingPlan|Upgrade for free"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billings|As a user on a free or trial namespace, you'll need to verify your account with a credit card to run pipelines. This is required to help prevent cryptomining attacks on GitLab infrastructure. %{strongStart}GitLab will not charge or store your credit card, it will only be used for validation.%{strongEnd} %{linkStart}Learn more%{linkEnd}."
|
||||
msgid "Billings|As a user on a free or trial namespace, you'll need to verify your account with a credit card to run pipelines. This is required to help prevent cryptomining attacks on GitLab infrastructure. %{strongStart}GitLab will not charge or store your credit card, it will only be used for validation.%{strongEnd}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billings|User Verification Required"
|
||||
|
|
|
@ -7,6 +7,21 @@ import {
|
|||
} from '~/editor/constants';
|
||||
import { EditorLiteExtension } from '~/editor/extensions/editor_lite_extension_base';
|
||||
|
||||
jest.mock('~/helpers/startup_css_helper', () => {
|
||||
return {
|
||||
waitForCSSLoaded: jest.fn().mockImplementation((cb) => {
|
||||
// We have to artificially put the callback's execution
|
||||
// to the end of the current call stack to be able to
|
||||
// test that the callback is called after waitForCSSLoaded.
|
||||
// setTimeout with 0 delay does exactly that.
|
||||
// Otherwise we might end up with false positive results
|
||||
setTimeout(() => {
|
||||
cb.apply();
|
||||
}, 0);
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
describe('The basis for an Editor Lite extension', () => {
|
||||
const defaultLine = 3;
|
||||
let ext;
|
||||
|
@ -44,6 +59,19 @@ describe('The basis for an Editor Lite extension', () => {
|
|||
});
|
||||
|
||||
describe('constructor', () => {
|
||||
it('resets the layout in waitForCSSLoaded callback', async () => {
|
||||
const instance = {
|
||||
layout: jest.fn(),
|
||||
};
|
||||
ext = new EditorLiteExtension({ instance });
|
||||
expect(instance.layout).not.toHaveBeenCalled();
|
||||
|
||||
// We're waiting for the waitForCSSLoaded mock to kick in
|
||||
await jest.runOnlyPendingTimers();
|
||||
|
||||
expect(instance.layout).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each`
|
||||
description | instance | options
|
||||
${'accepts configuration options and instance'} | ${{}} | ${defaultOptions}
|
||||
|
@ -51,6 +79,7 @@ describe('The basis for an Editor Lite extension', () => {
|
|||
${'does not fail if both instance and the options are omitted'} | ${undefined} | ${undefined}
|
||||
${'throws if only options are passed'} | ${undefined} | ${defaultOptions}
|
||||
`('$description', ({ instance, options } = {}) => {
|
||||
EditorLiteExtension.deferRerender = jest.fn();
|
||||
const originalInstance = { ...instance };
|
||||
|
||||
if (instance) {
|
||||
|
@ -82,12 +111,14 @@ describe('The basis for an Editor Lite extension', () => {
|
|||
});
|
||||
|
||||
it('initializes the line highlighting', () => {
|
||||
EditorLiteExtension.deferRerender = jest.fn();
|
||||
const spy = jest.spyOn(EditorLiteExtension, 'highlightLines');
|
||||
ext = new EditorLiteExtension({ instance: {} });
|
||||
expect(spy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('sets up the line linking for code instance', () => {
|
||||
EditorLiteExtension.deferRerender = jest.fn();
|
||||
const spy = jest.spyOn(EditorLiteExtension, 'setupLineLinking');
|
||||
const instance = {
|
||||
getEditorType: jest.fn().mockReturnValue(EDITOR_TYPE_CODE),
|
||||
|
@ -99,6 +130,7 @@ describe('The basis for an Editor Lite extension', () => {
|
|||
});
|
||||
|
||||
it('does not set up the line linking for diff instance', () => {
|
||||
EditorLiteExtension.deferRerender = jest.fn();
|
||||
const spy = jest.spyOn(EditorLiteExtension, 'setupLineLinking');
|
||||
const instance = {
|
||||
getEditorType: jest.fn().mockReturnValue(EDITOR_TYPE_DIFF),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
|
||||
import { EDITOR_READY_EVENT } from '~/editor/constants';
|
||||
import { EditorLiteExtension } from '~/editor/extensions/editor_lite_extension_base';
|
||||
import TextEditor from '~/pipeline_editor/components/editor/text_editor.vue';
|
||||
import {
|
||||
mockCiConfigPath,
|
||||
|
@ -59,6 +60,10 @@ describe('Pipeline Editor | Text editor component', () => {
|
|||
|
||||
const findEditor = () => wrapper.findComponent(MockEditorLite);
|
||||
|
||||
beforeEach(() => {
|
||||
EditorLiteExtension.deferRerender = jest.fn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
wrapper.destroy();
|
||||
wrapper = null;
|
||||
|
|
|
@ -47,7 +47,7 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do
|
|||
|
||||
context 'when Value Stream is not visible' do
|
||||
it 'returns link to the the first visible menu item' do
|
||||
allow(subject).to receive(:cycle_analytics_menu_item).and_return(nil)
|
||||
allow(subject).to receive(:cycle_analytics_menu_item).and_return(double(render?: false))
|
||||
|
||||
expect(subject.link).to eq subject.renderable_items.first.link
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue