Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-10-27 09:12:12 +00:00
parent 784d3f4422
commit ef96d56ed3
12 changed files with 93 additions and 71 deletions

View File

@ -1,5 +1,6 @@
--- ---
engines: version: "2"
plugins:
bundler-audit: bundler-audit:
enabled: true enabled: true
duplication: duplication:
@ -8,33 +9,22 @@ engines:
languages: languages:
- ruby - ruby
- javascript - javascript
ratings: rubocop:
paths: enabled: false
- Gemfile.lock exclude_patterns:
- "**.erb" - "{ee/,jh/,}config/"
- "**.haml" - "{ee/,jh/,}db/"
- "**.rb" - "**/log/"
- "**.rhtml" - "**/node_modules/"
- "**.slim" - "**/spec/"
- "**.inc" - "**/tmp/"
- "**.js" - "**/vendor/"
- "**.jsx"
- "**.module"
exclude_paths:
- config/
- db/
- features/
- node_modules/
- spec/
- vendor/
- .yarn-cache/ - .yarn-cache/
- tmp/ - backups/
- builds/ - builds/
- coverage/ - coverage/
- file_hooks/
- plugins/
- public/ - public/
- shared/ - shared/
- webpack-report/ - webpack-report/
- log/
- backups/
- plugins/
- file_hooks/

View File

@ -716,6 +716,7 @@
.rails:rules:decomposed-databases: .rails:rules:decomposed-databases:
rules: rules:
- <<: *if-merge-request-labels-run-decomposed - <<: *if-merge-request-labels-run-decomposed
- <<: *if-default-branch-schedule-nightly
.rails:rules:ee-and-foss-migration: .rails:rules:ee-and-foss-migration:
rules: rules:
@ -1200,12 +1201,16 @@
.rails:rules:detect-previous-failed-tests: .rails:rules:detect-previous-failed-tests:
rules: rules:
- <<: *if-not-canonical-namespace
when: never
- <<: *if-merge-request-labels-run-all-rspec - <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request - <<: *if-merge-request
changes: *code-backstage-patterns changes: *code-backstage-patterns
.rails:rules:rerun-previous-failed-tests: .rails:rules:rerun-previous-failed-tests:
rules: rules:
- <<: *if-not-canonical-namespace
when: never
- <<: *if-merge-request-labels-run-all-rspec - <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request - <<: *if-merge-request
changes: *code-backstage-patterns changes: *code-backstage-patterns
@ -1507,9 +1512,10 @@
changes: *ci-review-patterns changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
changes: *frontend-patterns changes: *frontend-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
changes: *code-qa-patterns changes: *qa-patterns
- <<: *if-dot-com-gitlab-org-merge-request
changes: *code-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-ee-schedule-child-pipeline - <<: *if-dot-com-ee-schedule-child-pipeline
allow_failure: true allow_failure: true

View File

@ -1 +1 @@
156e65d1de93e779091a0915cf77b2aefa85fadf ba8bc12dd0ff83fc726c6c09ee0cb0ebc311a748

View File

@ -1,5 +1,5 @@
<script> <script>
import { GlButton } from '@gitlab/ui'; import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import NoteableNote from '~/notes/components/noteable_note.vue'; import NoteableNote from '~/notes/components/noteable_note.vue';
import PublishButton from './publish_button.vue'; import PublishButton from './publish_button.vue';
@ -10,6 +10,9 @@ export default {
PublishButton, PublishButton,
GlButton, GlButton,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
props: { props: {
draft: { draft: {
type: Object, type: Object,
@ -72,6 +75,9 @@ export default {
} }
}, },
}, },
safeHtmlConfig: {
ADD_TAGS: ['use', 'gl-emoji'],
},
}; };
</script> </script>
<template> <template>
@ -104,8 +110,8 @@ export default {
<template v-if="!isEditingDraft"> <template v-if="!isEditingDraft">
<div <div
v-if="draftCommands" v-if="draftCommands"
v-safe-html:[$options.safeHtmlConfig]="draftCommands"
class="referenced-commands draft-note-commands" class="referenced-commands draft-note-commands"
v-html="draftCommands /* eslint-disable-line vue/no-v-html */"
></div> ></div>
<p class="draft-note-actions d-flex"> <p class="draft-note-actions d-flex">

View File

@ -1,5 +1,6 @@
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { GlSafeHtmlDirective } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
@ -19,6 +20,9 @@ export default {
noteForm, noteForm,
Suggestions, Suggestions,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
mixins: [autosave], mixins: [autosave],
props: { props: {
note: { note: {
@ -144,6 +148,9 @@ export default {
this.removeSuggestionInfoFromBatch(suggestionId); this.removeSuggestionInfoFromBatch(suggestionId);
}, },
}, },
safeHtmlConfig: {
ADD_TAGS: ['use', 'gl-emoji'],
},
}; };
</script> </script>
@ -163,11 +170,7 @@ export default {
@addToBatch="addSuggestionToBatch" @addToBatch="addSuggestionToBatch"
@removeFromBatch="removeSuggestionFromBatch" @removeFromBatch="removeSuggestionFromBatch"
/> />
<div <div v-else v-safe-html:[$options.safeHtmlConfig]="note.note_html" class="note-text md"></div>
v-else
class="note-text md"
v-html="note.note_html /* eslint-disable-line vue/no-v-html */"
></div>
<note-form <note-form
v-if="isEditing" v-if="isEditing"
ref="noteForm" ref="noteForm"

View File

@ -6,13 +6,13 @@ export const PROJECT_STORAGE_TYPES = [
name: s__('UsageQuota|Artifacts'), name: s__('UsageQuota|Artifacts'),
description: s__('UsageQuota|Pipeline artifacts and job artifacts, created with CI/CD.'), description: s__('UsageQuota|Pipeline artifacts and job artifacts, created with CI/CD.'),
warningMessage: s__( warningMessage: s__(
'UsageQuota|There is a known issue with Artifact storage where the total could be incorrect for some projects. More details and progress are available in %{warningLinkStart}the epic%{warningLinkEnd}.', 'UsageQuota|Because of a known issue, the artifact total for some projects may be incorrect. For more details, read %{warningLinkStart}the epic%{warningLinkEnd}.',
), ),
warningLink: 'https://gitlab.com/groups/gitlab-org/-/epics/5380', warningLink: 'https://gitlab.com/groups/gitlab-org/-/epics/5380',
}, },
{ {
id: 'lfsObjectsSize', id: 'lfsObjectsSize',
name: s__('UsageQuota|LFS Storage'), name: s__('UsageQuota|LFS storage'),
description: s__('UsageQuota|Audio samples, videos, datasets, and graphics.'), description: s__('UsageQuota|Audio samples, videos, datasets, and graphics.'),
}, },
{ {
@ -23,7 +23,7 @@ export const PROJECT_STORAGE_TYPES = [
{ {
id: 'repositorySize', id: 'repositorySize',
name: s__('UsageQuota|Repository'), name: s__('UsageQuota|Repository'),
description: s__('UsageQuota|Git repository, managed by the Gitaly service.'), description: s__('UsageQuota|Git repository.'),
}, },
{ {
id: 'snippetsSize', id: 'snippetsSize',
@ -55,7 +55,7 @@ export const LEARN_MORE_LABEL = s__('Learn more.');
export const USAGE_QUOTAS_LABEL = s__('UsageQuota|Usage Quotas'); export const USAGE_QUOTAS_LABEL = s__('UsageQuota|Usage Quotas');
export const HELP_LINK_ARIA_LABEL = s__('UsageQuota|%{linkTitle} help link'); export const HELP_LINK_ARIA_LABEL = s__('UsageQuota|%{linkTitle} help link');
export const TOTAL_USAGE_DEFAULT_TEXT = __('N/A'); export const TOTAL_USAGE_DEFAULT_TEXT = __('N/A');
export const TOTAL_USAGE_TITLE = s__('UsageQuota|Usage Breakdown'); export const TOTAL_USAGE_TITLE = s__('UsageQuota|Usage breakdown');
export const TOTAL_USAGE_SUBTITLE = s__( export const TOTAL_USAGE_SUBTITLE = s__(
'UsageQuota|Includes project registry, artifacts, packages, wiki, uploads and other items.', 'UsageQuota|Includes artifacts, repositories, wiki, uploads, and other items.',
); );

View File

@ -17,9 +17,9 @@ credentials, you must:
## Create a Jira Server user ## Create a Jira Server user
This process creates a user named `gitlab` and adds it to a new group named `gitlab-developers`: This process creates a user named `gitlab`:
1. Sign in to your Jira instance as an administrator. 1. Sign in to your Jira instance as a Jira administrator.
1. In the upper right corner of the top menu, go to the gear icon and 1. In the upper right corner of the top menu, go to the gear icon and
select **User Management**. select **User Management**.
1. Create a new user account (`gitlab`) with write access to 1. Create a new user account (`gitlab`) with write access to
@ -37,13 +37,15 @@ After you create the user, create a group for it.
## Create a Jira Server group ## Create a Jira Server group
After you [create a Jira Server user](#create-a-jira-server-user), you can create a After you [create a Jira Server user](#create-a-jira-server-user), create a
group to assign permissions to the user: group to assign permissions to the user.
1. Sign in to your Jira instance as an administrator. This process adds the `gitlab` user you created to a new group named `gitlab-developers`:
1. Sign in to your Jira instance as a Jira administrator.
1. In the upper right corner of the top menu, go to the gear icon and 1. In the upper right corner of the top menu, go to the gear icon and
select **User Management**. select **User Management**.
1. From the sidebar, select **Groups**. 1. On the sidebar, select **Groups**.
![Jira create new user](img/jira_create_new_group.png) ![Jira create new user](img/jira_create_new_group.png)
@ -52,12 +54,12 @@ group to assign permissions to the user:
1. To add the `gitlab` user to the `gitlab-developers` group, select **Edit members**. 1. To add the `gitlab` user to the `gitlab-developers` group, select **Edit members**.
The `gitlab-developers` group should be listed in the leftmost box as a The `gitlab-developers` group should be listed in the leftmost box as a
selected group. selected group.
1. In the **Add members to selected group(s)** area, enter `gitlab`. 1. In the **Add members to selected group(s)** section, enter `gitlab`.
1. Select **Add selected users**. 1. Select **Add selected users**.
Jira saves your selection, and `gitlab` should appear in the **Group member(s)** The `gitlab` user appears in the **Group member(s)**
area. section.
![Jira added user to group](img/jira_added_user_to_group.png) ![Jira added user to group](img/jira_added_user_to_group.png)
Next, create a permission scheme for your group. Next, create a permission scheme for your group.
@ -65,16 +67,16 @@ Next, create a permission scheme for your group.
After creating the group in Jira, grant permissions to the group by creating a permission scheme: After creating the group in Jira, grant permissions to the group by creating a permission scheme:
1. Sign in to your Jira instance as an administrator. 1. Sign in to your Jira instance as a Jira administrator.
1. In the upper right corner of the top menu, go to the gear icon and 1. In the upper right corner of the top menu, go to the gear icon and
select **Issues**. select **Issues**.
1. From the sidebar, select **Permission Schemes**. 1. On the sidebar, select **Permission Schemes**.
1. Select **Add Permission Scheme**, enter a **Name** and (optionally) a 1. Select **Add Permission Scheme**, enter a **Name** and (optionally) a
**Description**, and then select **Add**. **Description**, and then select **Add**.
1. In the permissions scheme list, locate your new permissions scheme, and 1. In the permissions scheme list, locate your new permissions scheme, and
select **Permissions**. select **Permissions**.
1. Next to **Administer Projects**, select **Edit**. In 1. Next to **Administer Projects**, select **Edit**.
the **Group** list, select `gitlab-developers`. 1. From the **Group** dropdown list, select `gitlab-developers`, and then select **Grant**.
![Jira group access](img/jira_group_access.png) ![Jira group access](img/jira_group_access.png)

View File

@ -142,7 +142,7 @@ needs this key to establish trust with your GitLab repository. To copy your SSH
1. On the left sidebar, select **Settings > Repository**. 1. On the left sidebar, select **Settings > Repository**.
1. Expand **Mirroring repositories**. 1. Expand **Mirroring repositories**.
1. Scroll to **Mirrored repositories**. 1. Scroll to **Mirrored repositories**.
1. Identify the correct repository, and select **Copy SSH public key**. 1. Identify the correct repository, and select **Copy SSH public key** (**{copy-to-clipboard}**).
1. Add the public SSH key to the other repository's configuration: 1. Add the public SSH key to the other repository's configuration:
- If the other repository is hosted on GitLab, add the public SSH key - If the other repository is hosted on GitLab, add the public SSH key
as a [deploy key](../../../project/deploy_keys/index.md). as a [deploy key](../../../project/deploy_keys/index.md).

View File

@ -36811,6 +36811,9 @@ msgstr ""
msgid "UsageQuota|Audio samples, videos, datasets, and graphics." msgid "UsageQuota|Audio samples, videos, datasets, and graphics."
msgstr "" msgstr ""
msgid "UsageQuota|Because of a known issue, the artifact total for some projects may be incorrect. For more details, read %{warningLinkStart}the epic%{warningLinkEnd}."
msgstr ""
msgid "UsageQuota|Buy additional minutes" msgid "UsageQuota|Buy additional minutes"
msgstr "" msgstr ""
@ -36829,10 +36832,10 @@ msgstr ""
msgid "UsageQuota|File attachments and smaller design graphics." msgid "UsageQuota|File attachments and smaller design graphics."
msgstr "" msgstr ""
msgid "UsageQuota|Git repository, managed by the Gitaly service." msgid "UsageQuota|Git repository."
msgstr "" msgstr ""
msgid "UsageQuota|Includes project registry, artifacts, packages, wiki, uploads and other items." msgid "UsageQuota|Includes artifacts, repositories, wiki, uploads, and other items."
msgstr "" msgstr ""
msgid "UsageQuota|Increase storage temporarily" msgid "UsageQuota|Increase storage temporarily"
@ -36844,6 +36847,9 @@ msgstr ""
msgid "UsageQuota|LFS Storage" msgid "UsageQuota|LFS Storage"
msgstr "" msgstr ""
msgid "UsageQuota|LFS storage"
msgstr ""
msgid "UsageQuota|Learn more about excess storage usage" msgid "UsageQuota|Learn more about excess storage usage"
msgstr "" msgstr ""
@ -36889,9 +36895,6 @@ msgstr ""
msgid "UsageQuota|Storage type" msgid "UsageQuota|Storage type"
msgstr "" msgstr ""
msgid "UsageQuota|There is a known issue with Artifact storage where the total could be incorrect for some projects. More details and progress are available in %{warningLinkStart}the epic%{warningLinkEnd}."
msgstr ""
msgid "UsageQuota|This is the total amount of storage used across your projects within this namespace." msgid "UsageQuota|This is the total amount of storage used across your projects within this namespace."
msgstr "" msgstr ""
@ -36931,10 +36934,10 @@ msgstr ""
msgid "UsageQuota|Usage" msgid "UsageQuota|Usage"
msgstr "" msgstr ""
msgid "UsageQuota|Usage Breakdown" msgid "UsageQuota|Usage Quotas"
msgstr "" msgstr ""
msgid "UsageQuota|Usage Quotas" msgid "UsageQuota|Usage breakdown"
msgstr "" msgstr ""
msgid "UsageQuota|Usage of group resources across the projects in the %{strong_start}%{group_name}%{strong_end} group" msgid "UsageQuota|Usage of group resources across the projects in the %{strong_start}%{group_name}%{strong_end} group"

View File

@ -28,7 +28,7 @@ export const projectData = {
name: 'Artifacts', name: 'Artifacts',
description: 'Pipeline artifacts and job artifacts, created with CI/CD.', description: 'Pipeline artifacts and job artifacts, created with CI/CD.',
warningMessage: warningMessage:
'There is a known issue with Artifact storage where the total could be incorrect for some projects. More details and progress are available in %{warningLinkStart}the epic%{warningLinkEnd}.', 'Because of a known issue, the artifact total for some projects may be incorrect. For more details, read %{warningLinkStart}the epic%{warningLinkEnd}.',
helpPath: '/build-artifacts', helpPath: '/build-artifacts',
}, },
value: 400000, value: 400000,
@ -36,7 +36,7 @@ export const projectData = {
{ {
storageType: { storageType: {
id: 'lfsObjectsSize', id: 'lfsObjectsSize',
name: 'LFS Storage', name: 'LFS storage',
description: 'Audio samples, videos, datasets, and graphics.', description: 'Audio samples, videos, datasets, and graphics.',
helpPath: '/lsf-objects', helpPath: '/lsf-objects',
}, },
@ -55,7 +55,7 @@ export const projectData = {
storageType: { storageType: {
id: 'repositorySize', id: 'repositorySize',
name: 'Repository', name: 'Repository',
description: 'Git repository, managed by the Gitaly service.', description: 'Git repository.',
helpPath: '/repository', helpPath: '/repository',
}, },
value: 3900000, value: 3900000,

View File

@ -44,20 +44,26 @@ RSpec.describe Tooling::Danger::ProductIntelligence do
context 'with product intelligence label' do context 'with product intelligence label' do
let(:expected_labels) { ['product intelligence::review pending'] } let(:expected_labels) { ['product intelligence::review pending'] }
let(:mr_labels) { [] }
before do before do
allow(fake_helper).to receive(:mr_has_labels?).with('product intelligence').and_return(true) allow(fake_helper).to receive(:mr_has_labels?).with('product intelligence').and_return(true)
allow(fake_helper).to receive(:mr_labels).and_return(mr_labels)
end end
it { is_expected.to match_array(expected_labels) } it { is_expected.to match_array(expected_labels) }
end
context 'with product intelligence::review pending' do context 'with product intelligence::review pending' do
before do let(:mr_labels) { ['product intelligence::review pending'] }
allow(fake_helper).to receive(:mr_has_labels?).and_return(true)
it { is_expected.to be_empty }
end end
it { is_expected.to be_empty } context 'with product intelligence::approved' do
let(:mr_labels) { ['product intelligence::approved'] }
it { is_expected.to be_empty }
end
end end
context 'with growth experiment label' do context 'with growth experiment label' do

View File

@ -14,10 +14,16 @@ module Tooling
labels = [] labels = []
labels << 'product intelligence' unless helper.mr_has_labels?('product intelligence') labels << 'product intelligence' unless helper.mr_has_labels?('product intelligence')
labels << 'product intelligence::review pending' unless helper.mr_has_labels?(WORKFLOW_LABELS) labels << 'product intelligence::review pending' unless has_workflow_labels?
labels labels
end end
private
def has_workflow_labels?
(WORKFLOW_LABELS & helper.mr_labels).any?
end
end end
end end
end end