Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2021-04-29 06:09:58 +00:00
parent 9f02780f4c
commit 64d80d99a9
14 changed files with 262 additions and 169 deletions

View File

@ -124,7 +124,7 @@
.docs-patterns: &docs-patterns .docs-patterns: &docs-patterns
- ".gitlab/route-map.yml" - ".gitlab/route-map.yml"
- "doc/**/*" - "doc/**/*"
- ".markdownlint.json" - ".markdownlint.yml"
- "scripts/lint-doc.sh" - "scripts/lint-doc.sh"
.frontend-dependency-patterns: &frontend-dependency-patterns .frontend-dependency-patterns: &frontend-dependency-patterns

View File

@ -26,9 +26,7 @@
- [ ] [Request a review](https://docs.gitlab.com/ee/development/code_review.html#dogfooding-the-reviewers-feature) - [ ] [Request a review](https://docs.gitlab.com/ee/development/code_review.html#dogfooding-the-reviewers-feature)
from the [designated Technical Writer](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments). from the [designated Technical Writer](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments).
/label ~"development guidelines" /label ~documentation
/label ~"Description templates (.gitlab/\*)"
/assign me /assign me
Do not add the ~"feature", ~"frontend", ~"backend", ~"bug", or ~"database" labels if you are only updating documentation. These labels will cause the MR to be added to code verification QA issues. Do not add the ~"feature", ~"frontend", ~"backend", ~"bug", or ~"database" labels if you are only updating documentation. These labels will cause the MR to be added to code verification QA issues.
@ -74,5 +72,3 @@ For more information, see our documentation on [Merging a merge request](https:/
1. [ ] Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review. 1. [ ] Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
1. [ ] Ensure a release milestone is set. 1. [ ] Ensure a release milestone is set.
1. [ ] If there has not been a technical writer review, [create an issue for one using the Doc Review template](https://gitlab.com/gitlab-org/gitlab/issues/new?issuable_template=Doc%20Review). 1. [ ] If there has not been a technical writer review, [create an issue for one using the Doc Review template](https://gitlab.com/gitlab-org/gitlab/issues/new?issuable_template=Doc%20Review).
/label ~documentation

View File

@ -1,148 +0,0 @@
{
"default": true,
"first-header-h1": true,
"header-style": {
"style": "atx"
},
"ul-style": {
"style": "dash"
},
"no-trailing-spaces": false,
"line-length": false,
"no-duplicate-header": {
"allow_different_nesting": true
},
"no-trailing-punctuation": {
"punctuation": ".,;:!。,;:!?"
},
"ol-prefix": {
"style": "one"
},
"no-inline-html": false,
"hr-style": {
"style": "---"
},
"no-emphasis-as-heading": false,
"first-line-h1": false,
"code-block-style": {
"style": "fenced"
},
"proper-names": {
"names": [
"Akismet",
"Alertmanager",
"API",
"Asana",
"Auth0",
"Authentiq",
"Azure",
"Bamboo",
"Bitbucket",
"Bugzilla",
"CAS",
"CentOS",
"Consul",
"Debian",
"DevOps",
"Docker",
"DockerSlim",
"Elasticsearch",
"Facebook",
"fastlane",
"fluent-plugin-redis-slowlog",
"GDK",
"Geo",
"Git LFS",
"git-annex",
"Git",
"Gitaly",
"GitHub",
"GitLab Geo",
"GitLab Monitor",
"GitLab Operator",
"GitLab Pages",
"GitLab Rails",
"GitLab Runner",
"GitLab Shell",
"GitLab Workhorse",
"GitLab",
"Gitleaks",
"Gmail",
"Google",
"Grafana",
"Gzip",
"Helm",
"HipChat",
"ID",
"Ingress",
"jasmine-jquery",
"JavaScript",
"Jaeger",
"Jenkins",
"Jira",
"Jira Cloud",
"Jira Server",
"jQuery",
"JSON",
"JupyterHub",
"Karma",
"Kerberos",
"Knative",
"Kubernetes",
"LDAP",
"Let's Encrypt",
"Markdown",
"markdownlint",
"Mattermost",
"Microsoft",
"Minikube",
"MinIO",
"ModSecurity",
"NGINX Ingress",
"NGINX",
"OAuth",
"OAuth 2",
"OmniAuth",
"Omnibus GitLab",
"OpenID",
"OpenShift",
"PgBouncer",
"PostgreSQL",
"Praefect",
"Prometheus",
"Puma",
"puma-worker-killer",
"Python",
"Rake",
"Redis",
"Redmine",
"reCAPTCHA",
"Ruby",
"runit",
"Salesforce",
"SAML",
"Sentry",
"Sidekiq",
"Shibboleth",
"Slack",
"SMTP",
"SpotBugs",
"SSH",
"Tiller",
"TOML",
"Trello",
"Trello Power-Ups",
"TypeScript",
"Twitter",
"Ubuntu",
"Ultra Auth",
"Unicorn",
"unicorn-worker-killer",
"URL",
"WebdriverIO",
"YAML",
"YouTrack"
],
"code_blocks": false
}
}

140
.markdownlint.yml Normal file
View File

@ -0,0 +1,140 @@
# Base Markdownlint configuration
# Extended Markdownlint configuration in doc/.markdownlint/
"default": true
"first-header-h1": true
"header-style":
"style": "atx"
"ul-style":
"style": "dash"
"no-trailing-spaces": false
"line-length": false
"no-duplicate-header":
"allow_different_nesting": true
"no-trailing-punctuation":
"punctuation": ".,;:!。,;:!?"
"ol-prefix":
"style": "one"
"no-inline-html": false
"hr-style":
"style": "---"
"no-emphasis-as-heading": false
"first-line-h1": false
"code-block-style":
"style": "fenced"
"proper-names":
"names": [
"Akismet",
"Alertmanager",
"API",
"Asana",
"Auth0",
"Authentiq",
"Azure",
"Bamboo",
"Bitbucket",
"Bugzilla",
"CAS",
"CentOS",
"Consul",
"Debian",
"DevOps",
"Docker",
"DockerSlim",
"Elasticsearch",
"Facebook",
"fastlane",
"fluent-plugin-redis-slowlog",
"GDK",
"Geo",
"Git LFS",
"git-annex",
"Git",
"Gitaly",
"GitHub",
"GitLab Geo",
"GitLab Monitor",
"GitLab Operator",
"GitLab Pages",
"GitLab Rails",
"GitLab Runner",
"GitLab Shell",
"GitLab Workhorse",
"GitLab",
"Gitleaks",
"Gmail",
"Google",
"Grafana",
"Gzip",
"Helm",
"HipChat",
"ID",
"Ingress",
"jasmine-jquery",
"JavaScript",
"Jaeger",
"Jenkins",
"Jira",
"Jira Cloud",
"Jira Server",
"jQuery",
"JSON",
"JupyterHub",
"Karma",
"Kerberos",
"Knative",
"Kubernetes",
"LDAP",
"Let's Encrypt",
"Markdown",
"markdownlint",
"Mattermost",
"Microsoft",
"Minikube",
"MinIO",
"ModSecurity",
"NGINX Ingress",
"NGINX",
"OAuth",
"OAuth 2",
"OmniAuth",
"Omnibus GitLab",
"OpenID",
"OpenShift",
"PgBouncer",
"PostgreSQL",
"Praefect",
"Prometheus",
"Puma",
"puma-worker-killer",
"Python",
"Rake",
"Redis",
"Redmine",
"reCAPTCHA",
"Ruby",
"runit",
"Salesforce",
"SAML",
"Sentry",
"Sidekiq",
"Shibboleth",
"Slack",
"SMTP",
"SpotBugs",
"SSH",
"Tiller",
"TOML",
"Trello",
"Trello Power-Ups",
"TypeScript",
"Twitter",
"Ubuntu",
"Ultra Auth",
"Unicorn",
"unicorn-worker-killer",
"URL",
"WebdriverIO",
"YAML",
"YouTrack"
]
"code_blocks": false

View File

@ -48,7 +48,7 @@ PreCommit:
enabled: true enabled: true
description: 'Lint documentation for Markdown errors' description: 'Lint documentation for Markdown errors'
required_executable: 'node_modules/.bin/markdownlint' required_executable: 'node_modules/.bin/markdownlint'
flags: ['--config', '.markdownlint.json', 'doc/**/*.md'] flags: ['--config', '.markdownlint.yml', 'doc/**/*.md']
install_command: 'yarn install' install_command: 'yarn install'
include: include:
- 'doc/**/*.md' - 'doc/**/*.md'

View File

@ -0,0 +1,3 @@
# Extended Markdown configuration to enforce no-trailing-spaces rule
"extends": "../../.markdownlint.yml"
"no-trailing-spaces": true

View File

@ -164,13 +164,12 @@ standard for GitLab documentation).
A rule that could cause confusion is `MD044/proper-names`, as it might not be A rule that could cause confusion is `MD044/proper-names`, as it might not be
immediately clear what caused markdownlint to fail, or how to correct the immediately clear what caused markdownlint to fail, or how to correct the
failure. This rule checks a list of known words, listed in the `.markdownlint.json` failure. This rule checks a list of known words, listed in the `.markdownlint.yml`
file in each project, to verify proper use of capitalization and backticks. file in each project, to verify proper use of capitalization and backticks.
Words in backticks are ignored by markdownlint. Words in backticks are ignored by markdownlint.
In general, product names should follow the exact capitalization of the official In general, product names should follow the exact capitalization of the official
names of the products, protocols, and so on. See [`.markdownlint.json`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.markdownlint.json) names of the products, protocols, and so on.
for the words tested for proper capitalization in GitLab documentation.
Some examples fail if incorrect capitalization is used: Some examples fail if incorrect capitalization is used:
@ -370,7 +369,7 @@ Capitalize names of:
- Third-party organizations, software, and products. For example, Prometheus, - Third-party organizations, software, and products. For example, Prometheus,
Kubernetes, Git, and The Linux Foundation. Kubernetes, Git, and The Linux Foundation.
- Methods or methodologies. For example, Continuous Integration, - Methods or methodologies. For example, Continuous Integration,
Continuous Deployment, Scrum, and Agile. (Tested in [`.markdownlint.json`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.markdownlint.json).) Continuous Deployment, Scrum, and Agile.
Follow the capitalization style listed at the [authoritative source](#links-to-external-documentation) Follow the capitalization style listed at the [authoritative source](#links-to-external-documentation)
for the entity, which may use non-standard case styles. For example: GitLab and for the entity, which may use non-standard case styles. For example: GitLab and

View File

@ -150,11 +150,11 @@ from those guidelines.
markdownlint configuration is found in the following projects: markdownlint configuration is found in the following projects:
- [`gitlab`](https://gitlab.com/gitlab-org/gitlab/blob/master/.markdownlint.json) - [`gitlab`](https://gitlab.com/gitlab-org/gitlab)
- [`gitlab-runner`](https://gitlab.com/gitlab-org/gitlab-runner/blob/master/.markdownlint.json) - [`gitlab-runner`](https://gitlab.com/gitlab-org/gitlab-runner)
- [`omnibus-gitlab`](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.markdownlint.json) - [`omnibus-gitlab`](https://gitlab.com/gitlab-org/omnibus-gitlab)
- [`charts`](https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/.markdownlint.json) - [`charts`](https://gitlab.com/gitlab-org/charts/gitlab)
- [`gitlab-development-kit`](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/.markdownlint.json) - [`gitlab-development-kit`](https://gitlab.com/gitlab-org/gitlab-development-kit)
This configuration is also used in build pipelines. This configuration is also used in build pipelines.

View File

@ -5043,12 +5043,18 @@ msgstr ""
msgid "Billing|An email address is only visible for users with public emails." msgid "Billing|An email address is only visible for users with public emails."
msgstr "" msgstr ""
msgid "Billing|An error occurred while getting a billable member details"
msgstr ""
msgid "Billing|An error occurred while loading billable members list" msgid "Billing|An error occurred while loading billable members list"
msgstr "" msgstr ""
msgid "Billing|An error occurred while removing a billable member" msgid "Billing|An error occurred while removing a billable member"
msgstr "" msgstr ""
msgid "Billing|Direct memberships"
msgstr ""
msgid "Billing|Enter at least three characters to search." msgid "Billing|Enter at least three characters to search."
msgstr "" msgstr ""
@ -5064,6 +5070,9 @@ msgstr ""
msgid "Billing|Remove user %{username} from your subscription" msgid "Billing|Remove user %{username} from your subscription"
msgstr "" msgstr ""
msgid "Billing|Toggle seat details"
msgstr ""
msgid "Billing|Type %{username} to confirm" msgid "Billing|Type %{username} to confirm"
msgstr "" msgstr ""

View File

@ -33,7 +33,9 @@
"lint:stylelint:fix": "yarn run lint:stylelint --fix", "lint:stylelint:fix": "yarn run lint:stylelint --fix",
"lint:stylelint:staged": "scripts/frontend/execute-on-staged-files.sh stylelint '(css|scss)' -q", "lint:stylelint:staged": "scripts/frontend/execute-on-staged-files.sh stylelint '(css|scss)' -q",
"lint:stylelint:staged:fix": "yarn run lint:stylelint:staged --fix", "lint:stylelint:staged:fix": "yarn run lint:stylelint:staged --fix",
"markdownlint": "markdownlint --config .markdownlint.json", "markdownlint": "markdownlint --config .markdownlint.yml",
"markdownlint:no-trailing-spaces": "markdownlint --config doc/.markdownlint/markdownlint-no-trailing-spaces.yml",
"markdownlint:no-trailing-spaces:fix": "yarn run markdownlint:no-trailing-spaces --fix",
"postinstall": "node ./scripts/frontend/postinstall.js", "postinstall": "node ./scripts/frontend/postinstall.js",
"stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js", "stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js",
"webpack": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.config.js", "webpack": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.config.js",

View File

@ -0,0 +1,46 @@
# frozen_string_literal: true
module QA
RSpec.describe 'Create' do
describe 'Branch with unusual name' do
let(:branch_name) { 'unUsually/named#br--anch' }
let(:project) do
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'unusually-named-branch-project'
resource.initialize_with_readme = true
end
end
before do
Flow::Login.sign_in
end
context 'when branch name contains slash, hash, double dash, and capital letter' do
it 'renders repository file tree correctly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1780' do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.branch = branch_name
commit.start_branch = project.default_branch
commit.commit_message = 'Add new file'
commit.add_files([
{ file_path: 'test-folder/test-file.md', content: 'new content' }
])
end
project.visit!
Page::Project::Show.perform do |show|
show.switch_to_branch(branch_name)
show.click_file('test-folder')
expect(show).to have_file('test-file.md')
show.click_file('test-file.md')
expect(show).to have_content('new content')
end
end
end
end
end
end

View File

@ -0,0 +1,47 @@
# frozen_string_literal: true
module QA
RSpec.describe 'Create' do
describe 'File with unusual name' do
let(:file_name) { '-un:usually;named#file?.md' }
let(:project) do
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'unusually-named-file-project'
resource.initialize_with_readme = true
end
end
before do
Flow::Login.sign_in
end
context 'when file name starts with a dash and contains hash, semicolon, colon, and question mark' do
it 'renders repository file tree correctly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1779' do
Resource::File.fabricate_via_api! do |file|
file.project = project
file.commit_message = 'Add new file'
file.name = "test-folder/#{file_name}"
file.content = "### Heading\n\n[Gitlab link](https://gitlab.com/)"
end
project.visit!
Page::Project::Show.perform do |show|
show.click_file('test-folder')
expect(show).to have_file(file_name)
show.click_file(file_name)
aggregate_failures 'markdown file contents' do
expect(show).to have_content('Heading')
expect(show).to have_content('Gitlab link')
expect(show).not_to have_content('###')
expect(show).not_to have_content('https://gitlab.com/')
end
end
end
end
end
end
end

View File

@ -137,7 +137,7 @@ if [ -z "${MD_DOC_PATH}" ]
then then
echo "Merged results pipeline detected, but no markdown files found. Skipping." echo "Merged results pipeline detected, but no markdown files found. Skipping."
else else
run_locally_or_in_docker 'markdownlint' "--config .markdownlint.json ${MD_DOC_PATH}" run_locally_or_in_docker 'markdownlint' "--config .markdownlint.yml ${MD_DOC_PATH}"
fi fi
echo '=> Linting prose...' echo '=> Linting prose...'

View File

@ -281,13 +281,12 @@ function download_chart() {
curl --location -o gitlab.tar.bz2 "https://gitlab.com/gitlab-org/charts/gitlab/-/archive/${GITLAB_HELM_CHART_REF}/gitlab-${GITLAB_HELM_CHART_REF}.tar.bz2" curl --location -o gitlab.tar.bz2 "https://gitlab.com/gitlab-org/charts/gitlab/-/archive/${GITLAB_HELM_CHART_REF}/gitlab-${GITLAB_HELM_CHART_REF}.tar.bz2"
tar -xjf gitlab.tar.bz2 tar -xjf gitlab.tar.bz2
cd "gitlab-${GITLAB_HELM_CHART_REF}"
echoinfo "Adding the gitlab repo to Helm..." echoinfo "Adding the gitlab repo to Helm..."
helm repo add gitlab https://charts.gitlab.io helm repo add gitlab https://charts.gitlab.io
echoinfo "Building the gitlab chart's dependencies..." echoinfo "Building the gitlab chart's dependencies..."
helm dependency build . helm dependency build "gitlab-${GITLAB_HELM_CHART_REF}"
} }
function base_config_changed() { function base_config_changed() {
@ -372,7 +371,7 @@ HELM_CMD=$(cat << EOF
${HELM_CMD} \ ${HELM_CMD} \
--version="${CI_PIPELINE_ID}-${CI_JOB_ID}" \ --version="${CI_PIPELINE_ID}-${CI_JOB_ID}" \
-f "${base_config_file}" \ -f "${base_config_file}" \
"${release}" . "${release}" "gitlab-${GITLAB_HELM_CHART_REF}"
EOF EOF
) )