New upstream version 13.8.5+ds1

This commit is contained in:
Pirate Praveen 2021-03-08 18:12:59 +05:30
parent 230c9f7a6f
commit 81ade28521
5072 changed files with 176320 additions and 73527 deletions

View File

@ -43,6 +43,18 @@ rules:
promise/always-return: off
promise/no-callback-in-promise: off
"@gitlab/no-global-event-off": error
# BEGIN eslint-plugin-vue@7 overrides
# TODO: Remove these rules as part of
# https://gitlab.com/groups/gitlab-org/-/epics/5142. These are setting
# various vue lint rules as they were in eslint-plugin-vue@6, or disabling
# new ones, to ease migration to v7, so violations of each can be fixed
# separately.
vue/no-mutating-props: off
vue/one-component-per-file: off
vue/no-lone-template: off
vue/component-definition-name-casing: off
# END eslint-plugin-vue@7 overrides
overrides:
- files:
- '**/spec/**/*'

View File

@ -64,7 +64,7 @@ variables:
BUILD_ASSETS_IMAGE: "false"
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
DOCKER_VERSION: "19.03.0"
DOCKER_VERSION: "20.10.1"
CACHE_CLASSES: "true"
# Preparing custom clone path to reduce space used by all random forks
@ -110,3 +110,4 @@ include:
- local: .gitlab/ci/notify.gitlab-ci.yml
- local: .gitlab/ci/dast.gitlab-ci.yml
- local: .gitlab/ci/workhorse.gitlab-ci.yml
- local: .gitlab/ci/graphql.gitlab-ci.yml

View File

@ -250,10 +250,10 @@ Dangerfile @gl-quality/eng-prod
/ee/spec/lib/gitlab/code_owners/ @reprazent @kerrizor @garyh
/doc/user/project/code_owners.md @reprazent @kerrizor @garyh
[Product Analytics]
/ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/product_analytics/engineers
/ee/lib/ee/gitlab/usage_data.rb @gitlab-org/growth/product_analytics/engineers
/lib/gitlab/grafana_embed_usage_data.rb @gitlab-org/growth/product_analytics/engineers
/lib/gitlab/usage_data.rb @gitlab-org/growth/product_analytics/engineers
/lib/gitlab/cycle_analytics/usage_data.rb @gitlab-org/growth/product_analytics/engineers
/lib/gitlab/usage_data_counters/ @gitlab-org/growth/product_analytics/engineers
[Product Intelligence]
/ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/product-intelligence/engineers
/ee/lib/ee/gitlab/usage_data.rb @gitlab-org/growth/product-intelligence/engineers
/lib/gitlab/grafana_embed_usage_data.rb @gitlab-org/growth/product-intelligence/engineers
/lib/gitlab/usage_data.rb @gitlab-org/growth/product_intelligence/engineers
/lib/gitlab/cycle_analytics/usage_data.rb @gitlab-org/growth/product-intelligence/engineers
/lib/gitlab/usage_data_counters/ @gitlab-org/growth/product-intelligence/engineers

View File

@ -15,7 +15,6 @@
# SEED_NESTED_GROUPS: "false" # requires network connection
.run-dev-fixtures-script: &run-dev-fixtures-script
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- run_timed_command "RAILS_ENV=test bundle exec rake db:seed_fu"

View File

@ -43,7 +43,7 @@ docs-lint markdown:
- .default-retry
- .docs:rules:docs-lint
# When updating the image version here, update it in /scripts/lint-doc.sh too.
image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.12-vale-2.6.1-markdownlint-0.24.0"
image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.12-vale-2.8.0-markdownlint-0.26.0"
stage: test
needs: []
script:
@ -84,16 +84,3 @@ ui-docs-links lint:
needs: []
script:
- bundle exec haml-lint -i DocumentationLinks
graphql-reference-verify:
extends:
- .default-retry
- .rails-cache
- .default-before_script
- .docs:rules:graphql-reference-verify
- .use-pg11
stage: test
needs: ["setup-test-env"]
script:
- bundle exec rake gitlab:graphql:check_docs
- bundle exec rake gitlab:graphql:check_schema

View File

@ -103,7 +103,6 @@ update-yarn-cache:
WEBPACK_VENDOR_DLL: "true"
script:
- run_timed_command "gem install knapsack --no-document"
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source ./scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag frontend_fixture"
@ -236,6 +235,8 @@ coverage-frontend:
- *yarn-install
script:
- run_timed_command "yarn node scripts/frontend/merge_coverage_frontend.js"
# Removing the individual coverage results, as we just merged them.
- rm -r coverage-frontend/jest-*
coverage: '/^Statements\s*:\s*?(\d+(?:\.\d+)?)%/'
artifacts:
name: coverage-frontend

View File

@ -112,7 +112,7 @@
.use-kaniko:
image:
name: gcr.io/kaniko-project/executor:debug-v0.20.0
name: gcr.io/kaniko-project/executor:debug-v1.3.0
entrypoint: [""]
before_script:
- source scripts/utils.sh

View File

@ -0,0 +1,14 @@
graphql-verify:
variables:
SETUP_DB: "false"
extends:
- .default-retry
- .rails-cache
- .default-before_script
- .graphql:rules:graphql-verify
stage: test
needs: []
script:
- bundle exec rake gitlab:graphql:validate
- bundle exec rake gitlab:graphql:check_docs
- bundle exec rake gitlab:graphql:check_schema

View File

@ -14,7 +14,6 @@ pages:
- mv coverage/ public/coverage-ruby/ || true
- mv coverage-frontend/ public/coverage-frontend/ || true
- mv coverage-javascript/ public/coverage-javascript/ || true
- mv webpack-report/ public/webpack-report/ || true
- cp .public/assets/application-*.css public/application.css || true
- cp .public/assets/application-*.css.gz public/application.css.gz || true
artifacts:

View File

@ -10,7 +10,6 @@
# Only install knapsack after bundle install! Otherwise oddly some native
# gems could not be found under some circumstance. No idea why, hours wasted.
- run_timed_command "gem install knapsack --no-document"
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source ./scripts/rspec_helpers.sh
@ -150,20 +149,35 @@ setup-test-env:
script:
- run_timed_command "bundle exec ruby -I. -e 'require \"config/environment\"; TestEnv.init'"
- run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here
- rm tmp/tests/gitaly/.ruby-bundle # This file prevents gems from being installed even if vendor/gitaly-ruby is missing
artifacts:
expire_in: 7d
paths:
- config/secrets.yml
- tmp/tests/gitaly
- tmp/tests/gitlab-elasticsearch-indexer
- tmp/tests/gitlab-shell
- tmp/tests/gitlab-test-fork
- tmp/tests/gitlab-test-fork_bare
- tmp/tests/gitlab-test
- tmp/tests/gitlab-workhorse
- tmp/tests/repositories
- tmp/tests/second_storage
- tmp/tests/gitaly/config.toml
- tmp/tests/gitaly/gitaly
- tmp/tests/gitaly/gitaly2.config.toml
- tmp/tests/gitaly/gitaly-git2go
- tmp/tests/gitaly/gitaly-hooks
- tmp/tests/gitaly/gitaly-lfs-smudge
- tmp/tests/gitaly/gitaly-ssh
- tmp/tests/gitaly/internal/
- tmp/tests/gitaly/internal_sockets/
- tmp/tests/gitaly/Makefile
- tmp/tests/gitaly/praefect
- tmp/tests/gitaly/praefect.config.toml
- tmp/tests/gitaly/ruby/
- tmp/tests/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer
- tmp/tests/gitlab-shell/
- tmp/tests/gitlab-test-fork/
- tmp/tests/gitlab-test-fork_bare/
- tmp/tests/gitlab-test/
- tmp/tests/gitlab-workhorse/gitlab-zip-metadata
- tmp/tests/gitlab-workhorse/gitlab-zip-cat
- tmp/tests/gitlab-workhorse/gitlab-workhorse
- tmp/tests/gitlab-workhorse/gitlab-resize-image
- tmp/tests/gitlab-workhorse/config.toml
- tmp/tests/repositories/
- tmp/tests/second_storage/
when: always
update-rails-cache:
@ -286,6 +300,16 @@ rspec system pg11 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-and-foss-system:minimal
# Dedicated job to test DB library code against PG12.
# Note that these are already tested against PG11 in the `rspec unit pg11` / `rspec-ee unit pg11` jobs.
rspec db-library-code pg12:
extends:
- .rspec-base-pg12
- .rails:rules:ee-and-foss-db-library-code
script:
- *base-script
- rspec_db_library_code
rspec fast_spec_helper:
extends:
- .rspec-base-pg11
@ -311,6 +335,14 @@ db:check-schema:
script:
- source scripts/schema_changed.sh
db:check-migrations:
extends:
- .db-job-base
- .rails:rules:ee-and-foss-mr-with-migration
script:
- scripts/validate_migration_schema
allow_failure: true
db:migrate-from-v12.10.0:
extends: .db-job-base
variables:
@ -376,6 +408,38 @@ db:backup_and_restore:
rules:
- changes: ["lib/backup/**/*"]
rspec:deprecations:
extends:
- .default-retry
- .default-before_script
- .static-analysis-cache
- .rails:rules:deprecations
stage: post-test
allow_failure: true
# We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
# so we use `dependencies` here.
dependencies:
- rspec migration pg11
- rspec unit pg11
- rspec integration pg11
- rspec system pg11
- rspec-ee migration pg11
- rspec-ee unit pg11
- rspec-ee integration pg11
- rspec-ee system pg11
- rspec-ee unit pg11 geo
- rspec-ee integration pg11 geo
- rspec-ee system pg11 geo
variables:
SETUP_DB: "false"
script:
- run_timed_command "bundle exec rubocop --only Lint/LastKeywordArgument --parallel"
artifacts:
expire_in: 31d
when: always
paths:
- deprecations/
rspec:coverage:
extends:
- .coverage-base
@ -549,33 +613,36 @@ rspec-ee unit pg11 geo:
- .rails:rules:ee-only-unit
- .rspec-ee-unit-geo-parallel
rspec-ee unit pg11 geo minimal:
extends:
- rspec-ee unit pg11 geo
- .minimal-rspec-tests
- .rails:rules:ee-only-unit:minimal
# FIXME: Temporarily disable geo minimal rspec jobs https://gitlab.com/gitlab-org/gitlab/-/issues/294212
#rspec-ee unit pg11 geo minimal:
# extends:
# - rspec-ee unit pg11 geo
# - .minimal-rspec-tests
# - .rails:rules:ee-only-unit:minimal
rspec-ee integration pg11 geo:
extends:
- .rspec-ee-base-geo-pg11
- .rails:rules:ee-only-integration
rspec-ee integration pg11 geo minimal:
extends:
- rspec-ee integration pg11 geo
- .minimal-rspec-tests
- .rails:rules:ee-only-integration:minimal
# FIXME: Temporarily disable geo minimal rspec jobs https://gitlab.com/gitlab-org/gitlab/-/issues/294212
#rspec-ee integration pg11 geo minimal:
# extends:
# - rspec-ee integration pg11 geo
# - .minimal-rspec-tests
# - .rails:rules:ee-only-integration:minimal
rspec-ee system pg11 geo:
extends:
- .rspec-ee-base-geo-pg11
- .rails:rules:ee-only-system
rspec-ee system pg11 geo minimal:
extends:
- rspec-ee system pg11 geo
- .minimal-rspec-tests
- .rails:rules:ee-only-system:minimal
# FIXME: Temporarily disable geo minimal rspec jobs https://gitlab.com/gitlab-org/gitlab/-/issues/294212
#rspec-ee system pg11 geo minimal:
# extends:
# - rspec-ee system pg11 geo
# - .minimal-rspec-tests
# - .rails:rules:ee-only-system:minimal
db:rollback geo:
extends:

View File

@ -4,9 +4,9 @@
# - template: Security/Dependency-Scanning.gitlab-ci.yml
# - template: Security/DAST.gitlab-ci.yml
# We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
# We need to duplicate this job's definition because the rules
# defined in the extended jobs rely on local YAML anchors
# (`*if-default-refs`)
code_quality:
extends:
- .default-retry
@ -36,9 +36,9 @@ code_quality:
- gl-code-quality-report.json # GitLab-specific
expire_in: 1 week # GitLab-specific
# We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
# We need to duplicate this job's definition because the rules
# defined in the extended jobs rely on local YAML anchors
# (`*if-default-refs`)
.sast:
extends:
- .default-retry
@ -89,74 +89,58 @@ secrets-sast:
sast: gl-secret-detection-report.json
expire_in: 1 week # GitLab-specific
# We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
dependency_scanning:
# We need to duplicate this job's definition because the rules
# defined in the extended jobs rely on local YAML anchors
# (`*if-default-refs`)
.dependency_scanning:
extends:
- .default-retry
- .reports:rules:dependency_scanning
- .use-docker-in-docker
stage: test
needs: []
variables:
DS_MAJOR_VERSION: 2
DS_EXCLUDED_PATHS: "qa/qa/ee/fixtures/secure_premade_reports,spec,ee/spec" # GitLab-specific
script:
- |
if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:2375'
fi
fi
- | # this is required to avoid undesirable reset of Docker image ENV variables being set on build stage
function propagate_env_vars() {
CURRENT_ENV=$(printenv)
for VAR_NAME; do
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
done
}
- |
docker run \
$(propagate_env_vars \
DS_ANALYZER_IMAGES \
DS_ANALYZER_IMAGE_PREFIX \
DS_ANALYZER_IMAGE_TAG \
DS_DEFAULT_ANALYZERS \
DS_EXCLUDED_PATHS \
DS_DOCKER_CLIENT_NEGOTIATION_TIMEOUT \
DS_PULL_ANALYZER_IMAGE_TIMEOUT \
DS_RUN_ANALYZER_TIMEOUT \
DS_PYTHON_VERSION \
DS_PIP_VERSION \
DS_PIP_DEPENDENCY_PATH \
GEMNASIUM_DB_LOCAL_PATH \
GEMNASIUM_DB_REMOTE_URL \
GEMNASIUM_DB_REF_NAME \
PIP_INDEX_URL \
PIP_EXTRA_INDEX_URL \
PIP_REQUIREMENTS_FILE \
MAVEN_CLI_OPTS \
BUNDLER_AUDIT_UPDATE_DISABLED \
BUNDLER_AUDIT_ADVISORY_DB_URL \
BUNDLER_AUDIT_ADVISORY_DB_REF_NAME \
) \
--volume "$PWD:/code" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$DS_MAJOR_VERSION" /code
# Post-processing: This will be an after_script once this job will use the Dependency Scanning CI template
- apk add jq
# Lower execa severity based on https://gitlab.com/gitlab-org/gitlab/-/issues/223859#note_452922390
- jq '(.vulnerabilities[] | select (.cve == "yarn.lock:execa:gemnasium:05cfa2e8-2d0c-42c1-8894-638e2f12ff3d")).severity = "Medium"' gl-dependency-scanning-report.json > temp.json && mv temp.json gl-dependency-scanning-report.json
DS_EXCLUDED_PATHS: "qa/qa/ee/fixtures/secure_premade_reports, spec, ee/spec" # GitLab-specific
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
artifacts:
paths:
- gl-dependency-scanning-report.json # GitLab-specific
reports:
dependency_scanning: gl-dependency-scanning-report.json
expire_in: 1 week # GitLab-specific
script:
- /analyzer run
# The job below analysis dependencies for malicous behavior
dependency_scanning gemnasium:
extends: .dependency_scanning
image:
name: "$SECURE_ANALYZERS_PREFIX/gemnasium:$DS_MAJOR_VERSION"
before_script:
# git-lfs is needed for auto-remediation
- apk add git-lfs
after_script:
# Post-processing
- apk add jq
# Lower execa severity based on https://gitlab.com/gitlab-org/gitlab/-/issues/223859#note_452922390
- jq '(.vulnerabilities[] | select (.cve == "yarn.lock:execa:gemnasium:05cfa2e8-2d0c-42c1-8894-638e2f12ff3d")).severity = "Medium"' gl-dependency-scanning-report.json > temp.json && mv temp.json gl-dependency-scanning-report.json
dependency_scanning bundler-audit:
extends: .dependency_scanning
image:
name: "$SECURE_ANALYZERS_PREFIX/bundler-audit:$DS_MAJOR_VERSION"
dependency_scanning retire-js:
extends: .dependency_scanning
image:
name: "$SECURE_ANALYZERS_PREFIX/retire.js:$DS_MAJOR_VERSION"
dependency_scanning gemnasium-python:
extends: .dependency_scanning
image:
name: "$SECURE_ANALYZERS_PREFIX/gemnasium-python:$DS_MAJOR_VERSION"
# Analyze dependencies for malicious behavior
# See https://gitlab.com/gitlab-com/gl-security/security-research/package-hunter
package_hunter:
extends:
- .reports:schedule-dast

View File

@ -38,7 +38,7 @@ review-build-cng:
- BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng
# When the job is manual, review-deploy is also manual and we don't want people
# to have to manually start the jobs in sequence, so we do it for them.
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job --job-name "review-deploy"'
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-deploy"'
.review-workflow-base:
extends:
@ -48,7 +48,7 @@ review-build-cng:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
REVIEW_APPS_DOMAIN: "temp.gitlab-review.app" # FIXME: using temporary domain
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
GITLAB_HELM_CHART_REF: "v4.3.0"
GITLAB_HELM_CHART_REF: "v4.6.3"
environment:
name: review/${CI_COMMIT_REF_SLUG}${FREQUENCY}
url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}
@ -78,8 +78,8 @@ review-deploy:
- disable_sign_ups || (delete_release && exit 1)
# When the job is manual, review-qa-smoke is also manual and we don't want people
# to have to manually start the jobs in sequence, so we do it for them.
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job --job-name "review-qa-smoke"'
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job --job-name "review-performance"'
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-qa-smoke"'
- '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-performance"'
after_script:
# Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan.
# Set DAST_RUN to true when jobs are manually scheduled.

View File

@ -155,9 +155,15 @@
- "{,ee/}{,spec/}lib/{,ee/}gitlab/database{,_spec}.rb"
- "{,ee/}{,spec/}lib/{,ee/}gitlab/background_migration/**/*"
- "{,ee/}{,spec/}lib/{,ee/}gitlab/background_migration{,_spec}.rb"
- "{,ee/}spec/support/helpers/database/**/*"
- "config/prometheus/common_metrics.yml" # Used by Gitlab::DatabaseImporters::CommonMetrics::Importer
- "{,ee/}app/models/project_statistics.rb" # Used to calculate sizes in migration specs
.db-library-patterns: &db-library-patterns
- "{,ee/}{,spec/}lib/{,ee/}gitlab/database/**/*"
- "{,ee/}{,spec/}lib/{,ee/}gitlab/database{,_spec}.rb"
- "{,ee/}spec/support/helpers/database/**/*"
.backstage-patterns: &backstage-patterns
- "Dangerfile"
- "danger/**/*"
@ -349,7 +355,11 @@
changes: *docs-patterns
when: on_success
.docs:rules:graphql-reference-verify:
##################
# GraphQL rules #
##################
.graphql:rules:graphql-verify:
rules:
- <<: *if-not-ee
when: never
@ -507,6 +517,12 @@
- <<: *if-merge-request
changes: *db-patterns
.rails:rules:ee-and-foss-mr-with-migration:
rules:
- <<: *if-merge-request
changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-unit:
rules:
- changes: *backend-patterns
@ -765,6 +781,11 @@
- <<: *if-merge-request-title-as-if-foss
changes: *code-backstage-patterns
.rails:rules:ee-and-foss-db-library-code:
rules:
- changes: *db-library-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-mr-and-master-only:
rules:
- <<: *if-not-ee
@ -825,6 +846,13 @@
- <<: *if-merge-request
changes: *code-backstage-patterns
.rails:rules:deprecations:
rules:
- <<: *if-not-ee
when: never
- <<: *if-master-schedule-nightly
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:rspec-coverage:
rules:
- <<: *if-not-ee

View File

@ -27,7 +27,7 @@ Then leave running while monitoring and performing some testing through web, api
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlab.net/gitlab/devgitlaborg/?query=is%3Aunresolved)
## 2. Staging Trial
## 3. Staging Trial
#### Check Staging Server Versions
- [ ] GitLab: https://staging.gitlab.com/help

View File

@ -0,0 +1,203 @@
<!-- Title: Design Sprint -->
## Design Sprint Focus
* [ ] Have you [determined that a Design Sprint is appropriate for this project](#anchor-tag-to-handbook-page)?
<!-- What is the focus of the [Design Sprint](https://about.gitlab.com/handbook/product/product-processes/#design-sprint)? What problem area will you be solving for and who is the target user? -->
## Objectives
<!-- Try to describe the objectives of the Sprint in detail. eg "We want to introduce a new feature but we are unsure that we are thinking about the solution from the customer's perspective and through the Sprint we want to rethink the solution, prototype it and validate it with our customers" or "We are unhappy with the direction of one of our categories and we want to explore new directions with different stakeholders, reach to one solution and test it with users" or "Among the team we have different visions for a specific category and we want to work towards a solution we all support and test it with users". -->
## Outputs
- [ ] A User testing flow.
- [ ] A Prototype to be tested with users.
- [ ] User testing analysis.
- [ ] (If the solution is viable) An epic or issue that describes the direction in details and the next steps
- [ ] Necessary updates to the Handbook.
## Design Sprint Details
| Start | End |
| ------ | ------ |
| YYYY-MM-DD | YYYY-MM-DD |
| TT:TT PST | TT:TT PST |
### WHEN
**Start date:**
**End date:**
**Reference time zone:**
### WHERE
**Zoom link:**
### WHO
- `Name` `gitlab handle` - Facilitator
- `Name` `gitlab handle` - Decider (usually the Product Manager)
- `Name` `gitlab handle` - Co-decider (optional)
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Sprint team member
- `Name` `gitlab handle` - Co-facilitator (optional)
## Tools
Here is the list of tools for the Sprint preparation, collaboration and documentation. Prior to the Sprint make sure you have access to all of the following:
* **GitLab**<br/>
Each Sprint day outcomes and material will be documented in a separate issue under the Design Sprint epic.
* **Mural** (You can join as anonymous but we need to be able to identify input against names, so please create an account beforehand.<br/>
We will use Mural for most of the Sprint collaboration. Some of the things we will do in Mural:
* Create artifacts like affinity diagrams from participants' input
* Use post-its to comment on each other's points and to add notes
* Vote on ideas and solutions
* Create the first draft of the prototype.
The Mural link to the collaboration project will be provided in the issue before the start of the Design Sprint.
* **Video and/or screen recording tool** (Loom, Quicktime, Zoom or another tool you are using).<br/>
As part of the pre-Sprint homework, you will be asked to record a short Lightning Walkthrough video. You can use any tool you feel comfortable with as long as it can capture your screen, mouse pointer and your audio.
* **A4/Letter sized paper (preferably white blank), Sharpies/Pens** (please don't use a pencil because it doesn't create enough contrast for photos).<br/>
Day 2 of the sprint involves some (async) ideation via sketching so you will need a writing utensil (Sharpies are preferred because they force you to draw at a lower fidelity because the small details aren't necessary at this point) and some paper. This is the most fun part of the Sprint where you get into a design thinking mindset and can appeal to your creative self. Don't worry, it's not about artistry, it's about ideas and collaboration.
* **Camera (phone or other) or scanner**<br/>
You will need to upload sketches as images for the facilitator to prepare the material before the next sync meeting. You can take a photo with your phone or use a scanner if available.
* **Post-it notes (Optional)**<br/>
If you enjoy taking notes using post-it notes make sure you have available some of them as well. The upside is that they will make you feel more like you are in a workshop and will help the ideas flow (I find that typing is distracting while ideating). The downside is that you will have to digitalise the ones you want to share with the team in Mural.
## Artefacts & Pre-Read Material
<!-- If there is material that will be useful for the participants to read before the Design Sprint add here. -->
### Handbook pages
<!-- Add a link to the category vision from the handbook -->
### Competitor resources
<!-- Add any solutions by competitors that are relevant to the Design Sprint topic and could be used as source of inspiration. -->
### Articles on Design Sprints
* [The Design Sprint](https://www.gv.com/sprint/)
* [The Ultimate Guide To Remote Design Sprints](https://drive.google.com/file/d/16bwrAqHVf8qxovd87Q7LdzqwAgy7a6Rx/view?usp=sharing)
## Asyncronus tasks
### Design Sprint preparation
<!-- Replace the roles with GitLab handles to assign to specific participants -->
- [ ] Finalise participant list - `decider` and `facilitator`
- [ ] Create [participation form](https://docs.google.com/forms/d/e/1FAIpQLSc0_BNltvRW8yXXaJd8sIKzgDmrSGqILMfkoCJrAj6sFcsMcg/viewform?usp=sf_link) and send to participants (**deadline**: [date]) - `facilitator`
- [ ] Promote this issue to an epic - `facilitator`
- [ ] Create issues under the epic for the pre-workshop tasks: Expert interviews ([example](https://gitlab.com/groups/gitlab-org/configure/-/epics/3#note_332412524)), Lightning walkthroughs and How might we.. notetaking assignment ([example](https://gitlab.com/gitlab-org/configure/general/-/issues/52)), Voting How might we... notes assignment ([example](https://gitlab.com/gitlab-org/configure/general/-/issues/54)) - `facilitator`
- [ ] Create sync meetings in calendar and invite all participants (**deadline**: [date]) - `decider` or `facilitator`
- [ ] Block 2 hours for Sprint activities in calendar for the Sprint week - `all participants`
- [ ] Prepare material and tools (eg. presentation templates, Google folders, Instructions videos etc) and Mural board from the [Mural template ](https://app.mural.co/invitation/mural/gitlab2474/1586990879319?sender=jmandell0210&key=03c25e92-9a43-4a3d-8907-6f0c3b094ab8) - facilitator
- [ ] Finalize Agenda - `facilitator`
- [ ] Run a test with material and tools - `facilitator`
- [ ] Start user recruiting for prototype user testing (EOD 1) - `facilitator` or `decider`
### Pre-Sprint activities (Homework exercises)
Each exercise should be explained and documented in a separate issue. You can use the example issues above as templates.
- [ ] Fill form and submit (**deadline**: [date]) - `all participants except the facilitator`
- [ ] Expert interview analysis - `facilitator`
- [ ] Lightning walkthrough videos (**deadline**: [date]) - `all participants except the facilitator`
- [ ] How might we... notetaking assignment (**deadline**: [date]) - `all participants except the facilitator`
- [ ] Voting How might we... notes assignment (**deadline**: [date]) - `all participants except the facilitator`
- [ ] Add all required material to the Mural board (**deadline**: [date]) - `facilitator`
### During Sprint activities
- [ ] Organise user testing sessions - `facilitator` or `decider`
- [ ] Create the Prototype to be tested and task list (End of Day 3) - `Product designer` or `Front end developer`
- [ ] Run user testing sessions - `facilitator` or `decider`
### Post-Sprint activities
- [ ] Create a feedback issue for the Design Sprint - `facilitator` or `decider`
- [ ] Analyse user testing results - `facilitator` or `decider`
- [ ] Create report and share with the Design Sprint participants and wider team - `facilitator` or `decider`
## Personas
Deciding which persona we are focusing on will be part of the Day 1 discussions in the workshop. The personas we are going to consider are:
<!-- Choose which personas could be target users so that you choose from this list during the Sprint. Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/
* [Cameron (Compliance Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#cameron-compliance-manager)
* [Parker (Product Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#parker-product-manager)
* [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead)
* [Presley (Product Designer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#presley-product-designer)
* [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer)
* [Devon (DevOps Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#devon-devops-engineer)
* [Sidney (Systems Administrator)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sidney-systems-administrator)
* [Sam (Security Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sam-security-analyst)
* [Rachel (Release Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#rachel-release-manager)
* [Alex (Security Operations Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#alex-security-operations-engineer)
* [Simone (Software Engineer in Test)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#simone-software-engineer-in-test)
* [Allison (Application Ops)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#allison-application-ops)
* [Priyanka (Platform Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#priyanka-platform-engineer)
* [Dana (Data Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#dana-data-analyst)
* [Eddie (Content Editor)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#eddie-content-editor)
-->
## Agenda
### Day 1
| Activity | Duration | Tool | Description |
|---|---|---|---|
| Warm-up exercise | 5 mins | Mural | Write 1 post-it answering the questions: <br/>"My name is…"<br/>"My role is…"<br/>“Something about myself you may not know is…”<br/>"My wish for this workshop is…" |
| Summarise the async activities & complete Map | 20 mins | Mural | The Map is intended to show the focus of the Sprint and doesn't need to be complete or detailed. Steps:<br/> Go through the Map and the top voted How might wes tree as a warm-up/reminder. <br/> • Make appropriate adjustments and additions to the map based on the reviews from the team. <br/> • Add the most voted HMWs to the most relevant area on the Map. If a HMW can go to more than one place, add it to the most left area. |
| Long term goals/Deciding the Sprint goal | 15 mins | Mural | • Long term goal: Everyone spends 5 minutes in silence and writes one (max 2) long term goal post-it note for the Sprint. (5 mins ) <br/> • One by one everyone will read their goal aloud to the team. (5 mins) <br/> Everyone besides the decider will vote on the goal of the Sprint (1 dot). (4 minutes) <br/> The decider then makes the final decision on the long term goal of the Sprint. (1 min) |
| Sprint questions | 20 mins | Mural | • Referencing the Long Term goal, everyone will write 2-3 post-it note Sprint questions for the biggest challenges they think might stop us from achieving our long term goal (what might hold us back or hinder us from achieving this goal). The questions should start with “Can we...” (similarly to the HMW). (7 mins) <br/> • One by one everyone will read their Sprint questions aloud to the team. (5 mins) <br/> • Everyone (including the decider) votes on the top 3 questions they think we should focus on as Sprint challenges (3 dots). (5 mins) <br/> • Separate the 3 most voted questions and keep them on the side. (1 min) <br/> • Finally, the decider chooses one Sprint question that will be the question we will focus on more during the Sprint by placing a green smiley sticker on it. (1 min) <br/> • Move the long term goal and the Sprint questions to the dedicated Mural space, highlighting the ultimate Sprint question that the decider chose. (1 min) |
| Recap day. <br/> Short intro to next day and share the video with the next day exercise instructions. | 5 mins | Mural, Zoom | Summarise activities of the day and decisions. Brief walkthrough of the next day's activities and wrap up the day. |
### Day 2
| Activity | Duration | Tool | Description |
|---|---|---|---|
| Summary of Day 1 outcomes | 5 mins | Mural | Go through the previous day's activities, the Long term goal and the top voted Sprint questions, highlighting the ultimate Sprint question, and summarise the concept solution sketching homework exercise. |
| Concept gallery review | 20 mins | Mural | • Everyone takes some time to read through and look at every aspect of each of the sketches in the Concept Gallery. The concept sketches are anonymous to avoid bias (15 mins). <br/> • The team will then vote on their favorite concepts and/or components of a concept via the red dots. When they see something that interests them and they think it will help solve the long term goal/challenges they can add one or more dots. They can use as many red dots as they want. Be frivolous when adding dots but if you really like or think something is important, add more to draw attention to it (5 mins).<br/> Note: If anyone has any questions about a concept sketch create a red sticky and write that question down placing it under the concept sketches. |
| Speed critique | 5 mins | Mural | • The facilitator walks through each of the concepts, briefly summarizing each concept (to the best of their ability) with a focus on the areas that have been dotted. <br/> • During this time the facilitator will also try to answer any of the red post-it questions. <br/> • When the facilitator believes theyve reached the end of their summary for that concept, ask the team if there was a concept that was voted on but not discussed or if the point of the red dot vote was missed in the discussion.
| Straw Poll | ~15 mins | Mural | • All the participants, besides the Decider, vote using the larger green dot by adding their initials to it and placing it on the concept sketch they believe is the best one that will best fulfill the long term goal and challenges of this sprint and is worthy of being prototyped (2 mins) <br/> • Each participant will create a post-it note that explains their reasoning for choosing the concept. (5 mins) <br/> • Each participant will then get 1 minute to read through their post-it and attempt to sell their preferred concept to the Decider and the other participants. (5-10 mins) |
| Super Vote (The Decider) | 10 mins | Mural | • The Decider makes their final decision of which of the concepts is the one to move forward with. <br/> • The decider can discuss their thought process and any questions with the rest of the participants. <br/> • They will get 2 green smiley stickers to vote with. Placing one on the concept they want to move forward with and the second, optional smiley, can be used to mark any other area of any other concept they think should also be incorporated into the prototype. |
### Day 3
| Activity | Duration | Tool | Description |
|---|---|---|---|
| User test flow | 25 mins | Mural | • Each participant writes (on separate post-its) 6 steps/actions that represent a step of a flow (you can think of a high-level prototype flow) from start to finish. Place them in the appropriate location on the User Test section. (10 mins) <br/> • Each participant takes 1 minute to walk the team through their flows one-by-one (5-10 mins total). Note: It's best to have the Decider go last. <br/> • Voting: All the Sprint participants get one red dot (the Decider gets 2) to vote on the flow row they think is the best foundation for the prototype. <br/> • After everyone has voted the Decider will vote on the row they think is best with one dot using the second dot to, optionally, vote on an element of another flow they think should be incorporated into the prototype. (5 mins) <br/> • If the second dot is used copy the specific sticky into the main flow voted by the Decider. |
| Storyboard | 45 mins | Mural | • Copy the winning flow from the User Test Flow exercise to the Storyboard/Prototype section placing each individual post-it note into its own container. <br/> • Look at the sketch concepts and move over any relevant screens that fulfill the needs of the sticky note in that container. You can move the entire concept or screen capture cut/paste parts of concepts. Note: Dont add any unnecessary details or ideas that arent needed for the end result prototype <br/> • Fill in the details that are required for each step described in the sticky. |
| Recap day | 5 mins | Mural, Zoom | Summarise activities of the day and decisions. Brief walkthrough of the next day's activities and wrap up the day. |
### Day 4
| Activity | Duration | Tool | Description |
|---|---|---|---|
| Validate Prototype | 30 mins | Mural | • Go through the Prototype created by the Product designer or Front end developer and discuss any inaccuracies or missing content. |
| Wrap up the Sprint | 15 mins | Zoom, GitLab | • Recap the Sprint and discuss next steps. Create user testing issues. |
### Day 5
| Activity | Duration | Tool | Description |
|---|---|---|---|
| Prototype testing with 5 users | ~45 mins | Figma or code/Zoom | • Test the prototype with users. |
## Ground Rules
* Honor the Facilitator's directions. They're the guide for the entire process.
* Minimise distractions: During the week you will need to dedicate some hours to the Sprint for async tasks and sync video conferences. During this time we recommend blocking time in your calendar and having devices or apps with notifications turned off during that time.
* All opinions are valid and are equally important, however, the Decider has the ultimate, final decision.
* Everyone is an active participant in a sync activity (with the exception of the Observers).
* One conversation at a time.
* Document as much as you can: We should have concrete outputs to share with broader team. Also interesting ideas or fixes should be documented to be transferred in issues for our backlog.
* Stick to scheduled breaks during sync calls. The Facilitator will guide each session and set break times.
* The Sprint is one of the few chances we get to work so closely together. Have fun!

View File

@ -77,6 +77,15 @@ Please list the test areas (unit, integration and end-to-end) that needs to be a
See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance: https://about.gitlab.com/handbook/engineering/quality/test-engineering/#test-planning -->
### Available Tier
<!-- This section should be used for setting the appropriate tier that this feature will belong to. Pricing can be found here: https://about.gitlab.com/pricing/
* Free
* Premium/Silver
* Ultimate/Gold
-->
### What does success look like, and how can we measure that?
<!--

View File

@ -9,6 +9,7 @@ Set the title to: `Description of the original issue`
## Prior to starting the security release work
- [ ] Read the [security process for developers] if you are not familiar with it.
- Verify if the issue you're working on `gitlab-org/gitlab` is confidential, if it's public fix should be placed on GitLab canonical and no backports are required.
- [ ] Mark this [issue as related] to the Security Release Tracking Issue. You can find it on the topic of the `#releases` Slack channel.
- Fill out the [Links section](#links):
- [ ] Next to **Issue on GitLab**, add a link to the `gitlab-org/gitlab` issue that describes the security vulnerability.

View File

@ -11,6 +11,7 @@ Please link to the respective test case in the testcases project
- [ ] Follow the end-to-end tests [style guide](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/style_guide.html) and [best practices](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/best_practices.html).
- [ ] Use the appropriate [RSpec metadata tag(s)](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/rspec_metadata_tests.html#rspec-metadata-for-end-to-end-tests).
- [ ] Ensure that a created resource is removed after test execution.
- [ ] Ensure that no [transient bugs](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#transient-bugs) are hidden accidentally due to the usage of `waits` and `reloads`.
- [ ] Verify the tags to ensure it runs on the desired test environments.
- [ ] If this MR has a dependency on another MR, such as a GitLab QA MR, specify the order in which the MRs should be merged.
- [ ] (If applicable) Create a follow-up issue to document [the special setup](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/running_tests_that_require_special_setup.html) necessary to run the test: ISSUE_LINK

View File

@ -364,7 +364,6 @@ linters:
- 'ee/app/views/shared/issuable/_board_create_list_dropdown.html.haml'
- 'ee/app/views/shared/issuable/_filter_weight.html.haml'
- 'ee/app/views/shared/members/ee/_ldap_tag.html.haml'
- 'ee/app/views/shared/members/ee/_override_member_buttons.html.haml'
- 'ee/app/views/shared/members/ee/_sso_badge.html.haml'
- 'ee/app/views/shared/milestones/_burndown.html.haml'
- 'ee/app/views/shared/milestones/_weight.html.haml'

View File

@ -1,5 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "all"
}

View File

@ -48,6 +48,11 @@ Cop/StaticTranslationDefinition:
- 'spec/**/*'
- 'ee/spec/**/*'
InternalAffairs/DeprecateCopHelper:
Enabled: true
Include:
- spec/rubocop/**/*.rb
Lint/LastKeywordArgument:
Enabled: true
Safe: false
@ -321,6 +326,14 @@ RSpec/TimecopTravel:
- 'ee/spec/**/*.rb'
- 'qa/spec/**/*.rb'
RSpec/WebMockEnable:
Enabled: true
Include:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
Exclude:
- 'spec/support/webmock.rb'
Naming/PredicateName:
Enabled: true
Exclude:

View File

@ -1,3 +1,15 @@
---
# This file is not meant to store permanent exclusions.
# - for permanent lists, place them in the .rubocop.yml.
# - for short (less than 15 lines line) temporary lists, place them in the .rubocop_todo.yml file (run auto-generation).
#
# Purpose of this file:
# - show long exclusion lists that are hidden in generic auto-generation of .rubocop_todo.yml.
# - provide an 'in-flight' list of exclusions being worked on when qualifying as a long list
# as mentioned above.
# - guidelines for use found in
# https://docs.gitlab.com/ee/development/contributing/style_guides.html#resolving-rubocop-exceptions.
FactoryBot/InlineAssociation:
Exclude:
- 'ee/spec/factories/analytics/cycle_analytics/group_stages.rb'
@ -17,24 +29,109 @@ FactoryBot/InlineAssociation:
- 'spec/factories/uploads.rb'
- 'spec/factories/wiki_pages.rb'
Graphql/IDType:
InternalAffairs/DeprecateCopHelper:
Exclude:
- 'ee/app/graphql/ee/mutations/issues/update.rb'
- 'app/graphql/mutations/boards/issues/issue_move_list.rb'
- 'app/graphql/resolvers/design_management/design_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/design_resolver.rb'
- 'app/graphql/resolvers/design_management/designs_resolver.rb'
- 'app/graphql/resolvers/design_management/version/design_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/version_in_collection_resolver.rb'
- 'app/graphql/resolvers/design_management/version_resolver.rb'
- 'app/graphql/resolvers/design_management/versions_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb'
- 'app/graphql/resolvers/user_merge_requests_resolver.rb'
Gitlab/PolicyRuleBoolean:
Exclude:
- 'ee/app/policies/ee/identity_provider_policy.rb'
- 'spec/rubocop/code_reuse_helpers_spec.rb'
- 'spec/rubocop/qa_helpers_spec.rb'
- 'spec/rubocop/migration_helpers_spec.rb'
- 'spec/rubocop/cop/group_public_or_visible_to_user_spec.rb'
- 'spec/rubocop/cop/static_translation_definition_spec.rb'
- 'spec/rubocop/cop/lint/last_keyword_argument_spec.rb'
- 'spec/rubocop/cop/usage_data/large_table_spec.rb'
- 'spec/rubocop/cop/usage_data/distinct_count_by_large_foreign_key_spec.rb'
- 'spec/rubocop/cop/filename_length_spec.rb'
- 'spec/rubocop/cop/put_project_routes_under_scope_spec.rb'
- 'spec/rubocop/cop/gitlab/rails_logger_spec.rb'
- 'spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb'
- 'spec/rubocop/cop/gitlab/avoid_uploaded_file_from_params_spec.rb'
- 'spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb'
- 'spec/rubocop/cop/gitlab/bulk_insert_spec.rb'
- 'spec/rubocop/cop/gitlab/intersect_spec.rb'
- 'spec/rubocop/cop/gitlab/json_spec.rb'
- 'spec/rubocop/cop/gitlab/httparty_spec.rb'
- 'spec/rubocop/cop/gitlab/policy_rule_boolean_spec.rb'
- 'spec/rubocop/cop/gitlab/except_spec.rb'
- 'spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb'
- 'spec/rubocop/cop/gitlab/change_timezone_spec.rb'
- 'spec/rubocop/cop/gitlab/predicate_memoization_spec.rb'
- 'spec/rubocop/cop/gitlab/union_spec.rb'
- 'spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb'
- 'spec/rubocop/cop/ruby_interpolation_in_translation_spec.rb'
- 'spec/rubocop/cop/active_record_association_reload_spec.rb'
- 'spec/rubocop/cop/ban_catch_throw_spec.rb'
- 'spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb'
- 'spec/rubocop/cop/avoid_becomes_spec.rb'
- 'spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb'
- 'spec/rubocop/cop/qa/element_with_pattern_spec.rb'
- 'spec/rubocop/cop/inject_enterprise_edition_module_spec.rb'
- 'spec/rubocop/cop/code_reuse/finder_spec.rb'
- 'spec/rubocop/cop/code_reuse/worker_spec.rb'
- 'spec/rubocop/cop/code_reuse/service_class_spec.rb'
- 'spec/rubocop/cop/code_reuse/presenter_spec.rb'
- 'spec/rubocop/cop/code_reuse/serializer_spec.rb'
- 'spec/rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers_spec.rb'
- 'spec/rubocop/cop/default_scope_spec.rb'
- 'spec/rubocop/cop/graphql/resolver_type_spec.rb'
- 'spec/rubocop/cop/graphql/descriptions_spec.rb'
- 'spec/rubocop/cop/graphql/json_type_spec.rb'
- 'spec/rubocop/cop/graphql/gid_expected_type_spec.rb'
- 'spec/rubocop/cop/graphql/authorize_types_spec.rb'
- 'spec/rubocop/cop/graphql/id_type_spec.rb'
- 'spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb'
- 'spec/rubocop/cop/scalability/idempotent_worker_spec.rb'
- 'spec/rubocop/cop/scalability/cron_worker_context_spec.rb'
- 'spec/rubocop/cop/scalability/file_uploads_spec.rb'
- 'spec/rubocop/cop/api/grape_array_missing_coerce_spec.rb'
- 'spec/rubocop/cop/api/base_spec.rb'
- 'spec/rubocop/cop/destroy_all_spec.rb'
- 'spec/rubocop/cop/safe_params_spec.rb'
- 'spec/rubocop/cop/include_sidekiq_worker_spec.rb'
- 'spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb'
- 'spec/rubocop/cop/rspec/timecop_freeze_spec.rb'
- 'spec/rubocop/cop/rspec/any_instance_of_spec.rb'
- 'spec/rubocop/cop/rspec/factory_bot/inline_association_spec.rb'
- 'spec/rubocop/cop/rspec/top_level_describe_path_spec.rb'
- 'spec/rubocop/cop/rspec/be_success_matcher_spec.rb'
- 'spec/rubocop/cop/rspec/htt_party_basic_auth_spec.rb'
- 'spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb'
- 'spec/rubocop/cop/rspec/expect_gitlab_tracking_spec.rb'
- 'spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb'
- 'spec/rubocop/cop/rspec/timecop_travel_spec.rb'
- 'spec/rubocop/cop/rspec/env_assignment_spec.rb'
- 'spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb'
- 'spec/rubocop/cop/performance/ar_count_each_spec.rb'
- 'spec/rubocop/cop/performance/readlines_each_spec.rb'
- 'spec/rubocop/cop/project_path_helper_spec.rb'
- 'spec/rubocop/cop/migration/safer_boolean_column_spec.rb'
- 'spec/rubocop/cop/migration/remove_index_spec.rb'
- 'spec/rubocop/cop/migration/add_index_spec.rb'
- 'spec/rubocop/cop/migration/drop_table_spec.rb'
- 'spec/rubocop/cop/migration/hash_index_spec.rb'
- 'spec/rubocop/cop/migration/datetime_spec.rb'
- 'spec/rubocop/cop/migration/add_column_with_default_spec.rb'
- 'spec/rubocop/cop/migration/prevent_strings_spec.rb'
- 'spec/rubocop/cop/migration/add_timestamps_spec.rb'
- 'spec/rubocop/cop/migration/add_concurrent_index_spec.rb'
- 'spec/rubocop/cop/migration/update_column_in_batches_spec.rb'
- 'spec/rubocop/cop/migration/complex_indexes_require_name_spec.rb'
- 'spec/rubocop/cop/migration/refer_to_index_by_name_spec.rb'
- 'spec/rubocop/cop/migration/schedule_async_spec.rb'
- 'spec/rubocop/cop/migration/timestamps_spec.rb'
- 'spec/rubocop/cop/migration/remove_concurrent_index_spec.rb'
- 'spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb'
- 'spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb'
- 'spec/rubocop/cop/migration/add_reference_spec.rb'
- 'spec/rubocop/cop/migration/remove_column_spec.rb'
- 'spec/rubocop/cop/migration/create_table_with_foreign_keys_spec.rb'
- 'spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb'
- 'spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb'
- 'spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb'
- 'spec/rubocop/cop/avoid_return_from_blocks_spec.rb'
- 'spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb'
- 'spec/rubocop/cop/put_group_routes_under_scope_spec.rb'
- 'spec/rubocop/cop/sidekiq_options_queue_spec.rb'
- 'spec/rubocop/cop/ignored_columns_spec.rb'
- 'spec/rubocop/cop/prefer_class_methods_over_module_spec.rb'
Rails/SaveBang:
Exclude:
@ -204,7 +301,6 @@ Rails/SaveBang:
- 'spec/controllers/projects_controller_spec.rb'
- 'spec/controllers/sent_notifications_controller_spec.rb'
- 'spec/controllers/sessions_controller_spec.rb'
- 'spec/controllers/users_controller_spec.rb'
- 'spec/factories_spec.rb'
- 'spec/features/admin/admin_appearance_spec.rb'
- 'spec/features/admin/admin_labels_spec.rb'
@ -406,6 +502,7 @@ Rails/SaveBang:
- 'spec/requests/api/labels_spec.rb'
- 'spec/requests/api/project_import_spec.rb'
- 'spec/requests/projects/cycle_analytics_events_spec.rb'
- 'spec/requests/users_controller_spec.rb'
Rails/TimeZone:
Enabled: true
@ -669,128 +766,6 @@ RSpec/TimecopTravel:
Graphql/Descriptions:
Exclude:
- 'app/graphql/mutations/admin/sidekiq_queues/delete_jobs.rb'
- 'app/graphql/mutations/alert_management/base.rb'
- 'app/graphql/mutations/alert_management/http_integration/create.rb'
- 'app/graphql/mutations/alert_management/http_integration/destroy.rb'
- 'app/graphql/mutations/alert_management/http_integration/http_integration_base.rb'
- 'app/graphql/mutations/alert_management/http_integration/reset_token.rb'
- 'app/graphql/mutations/alert_management/http_integration/update.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/create.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/reset_token.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/update.rb'
- 'app/graphql/mutations/alert_management/update_alert_status.rb'
- 'app/graphql/mutations/award_emojis/base.rb'
- 'app/graphql/mutations/boards/destroy.rb'
- 'app/graphql/mutations/boards/issues/issue_move_list.rb'
- 'app/graphql/mutations/boards/lists/base.rb'
- 'app/graphql/mutations/boards/lists/create.rb'
- 'app/graphql/mutations/boards/lists/update.rb'
- 'app/graphql/mutations/branches/create.rb'
- 'app/graphql/mutations/ci/base.rb'
- 'app/graphql/mutations/ci/pipeline_retry.rb'
- 'app/graphql/mutations/commits/create.rb'
- 'app/graphql/mutations/concerns/mutations/resolves_resource_parent.rb'
- 'app/graphql/mutations/concerns/mutations/resolves_subscription.rb'
- 'app/graphql/mutations/concerns/mutations/spammable_mutation_fields.rb'
- 'app/graphql/mutations/container_expiration_policies/update.rb'
- 'app/graphql/mutations/container_repositories/destroy_tags.rb'
- 'app/graphql/mutations/custom_emoji/create.rb'
- 'app/graphql/mutations/design_management/base.rb'
- 'app/graphql/mutations/design_management/delete.rb'
- 'app/graphql/mutations/design_management/move.rb'
- 'app/graphql/mutations/design_management/upload.rb'
- 'app/graphql/mutations/discussions/toggle_resolve.rb'
- 'app/graphql/mutations/environments/canary_ingress/update.rb'
- 'app/graphql/mutations/issues/base.rb'
- 'app/graphql/mutations/issues/create.rb'
- 'app/graphql/mutations/issues/move.rb'
- 'app/graphql/mutations/issues/set_due_date.rb'
- 'app/graphql/mutations/issues/set_locked.rb'
- 'app/graphql/mutations/issues/update.rb'
- 'app/graphql/mutations/jira_import/import_users.rb'
- 'app/graphql/mutations/jira_import/start.rb'
- 'app/graphql/mutations/labels/create.rb'
- 'app/graphql/mutations/merge_requests/base.rb'
- 'app/graphql/mutations/merge_requests/create.rb'
- 'app/graphql/mutations/metrics/dashboard/annotations/create.rb'
- 'app/graphql/mutations/metrics/dashboard/annotations/delete.rb'
- 'app/graphql/mutations/notes/base.rb'
- 'app/graphql/mutations/notes/create/base.rb'
- 'app/graphql/mutations/notes/create/note.rb'
- 'app/graphql/mutations/notes/destroy.rb'
- 'app/graphql/mutations/notes/reposition_image_diff_note.rb'
- 'app/graphql/mutations/notes/update/base.rb'
- 'app/graphql/mutations/releases/base.rb'
- 'app/graphql/mutations/releases/create.rb'
- 'app/graphql/mutations/releases/update.rb'
- 'app/graphql/mutations/snippets/base.rb'
- 'app/graphql/mutations/snippets/create.rb'
- 'app/graphql/mutations/snippets/destroy.rb'
- 'app/graphql/mutations/snippets/mark_as_spam.rb'
- 'app/graphql/mutations/snippets/update.rb'
- 'app/graphql/mutations/terraform/state/base.rb'
- 'app/graphql/mutations/todos/create.rb'
- 'app/graphql/mutations/todos/mark_all_done.rb'
- 'app/graphql/mutations/todos/mark_done.rb'
- 'app/graphql/mutations/todos/restore.rb'
- 'app/graphql/mutations/todos/restore_many.rb'
- 'app/graphql/resolvers/admin/analytics/instance_statistics/measurements_resolver.rb'
- 'app/graphql/resolvers/alert_management/alert_resolver.rb'
- 'app/graphql/resolvers/alert_management/alert_status_counts_resolver.rb'
- 'app/graphql/resolvers/board_list_issues_resolver.rb'
- 'app/graphql/resolvers/board_lists_resolver.rb'
- 'app/graphql/resolvers/board_resolver.rb'
- 'app/graphql/resolvers/boards_resolver.rb'
- 'app/graphql/resolvers/ci/config_resolver.rb'
- 'app/graphql/resolvers/ci/jobs_resolver.rb'
- 'app/graphql/resolvers/ci/runner_setup_resolver.rb'
- 'app/graphql/resolvers/concerns/issue_resolver_arguments.rb'
- 'app/graphql/resolvers/concerns/resolves_pipelines.rb'
- 'app/graphql/resolvers/concerns/resolves_snippets.rb'
- 'app/graphql/resolvers/concerns/time_frame_arguments.rb'
- 'app/graphql/resolvers/container_repositories_resolver.rb'
- 'app/graphql/resolvers/design_management/design_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/design_resolver.rb'
- 'app/graphql/resolvers/design_management/designs_resolver.rb'
- 'app/graphql/resolvers/design_management/version/design_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/version_in_collection_resolver.rb'
- 'app/graphql/resolvers/design_management/version_resolver.rb'
- 'app/graphql/resolvers/design_management/versions_resolver.rb'
- 'app/graphql/resolvers/echo_resolver.rb'
- 'app/graphql/resolvers/environments_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_errors_resolver.rb'
- 'app/graphql/resolvers/full_path_resolver.rb'
- 'app/graphql/resolvers/group_members_resolver.rb'
- 'app/graphql/resolvers/group_milestones_resolver.rb'
- 'app/graphql/resolvers/issues_resolver.rb'
- 'app/graphql/resolvers/members_resolver.rb'
- 'app/graphql/resolvers/merge_request_resolver.rb'
- 'app/graphql/resolvers/merge_requests_resolver.rb'
- 'app/graphql/resolvers/metrics/dashboard_resolver.rb'
- 'app/graphql/resolvers/metrics/dashboards/annotation_resolver.rb'
- 'app/graphql/resolvers/milestones_resolver.rb'
- 'app/graphql/resolvers/namespace_projects_resolver.rb'
- 'app/graphql/resolvers/project_members_resolver.rb'
- 'app/graphql/resolvers/project_milestones_resolver.rb'
- 'app/graphql/resolvers/project_pipeline_resolver.rb'
- 'app/graphql/resolvers/projects/jira_projects_resolver.rb'
- 'app/graphql/resolvers/projects/services_resolver.rb'
- 'app/graphql/resolvers/projects_resolver.rb'
- 'app/graphql/resolvers/release_resolver.rb'
- 'app/graphql/resolvers/releases_resolver.rb'
- 'app/graphql/resolvers/snippets/blobs_resolver.rb'
- 'app/graphql/resolvers/snippets_resolver.rb'
- 'app/graphql/resolvers/todo_resolver.rb'
- 'app/graphql/resolvers/tree_resolver.rb'
- 'app/graphql/resolvers/user_resolver.rb'
- 'app/graphql/resolvers/user_starred_projects_resolver.rb'
- 'app/graphql/resolvers/users/snippets_resolver.rb'
- 'app/graphql/resolvers/users_resolver.rb'
- 'app/graphql/types/access_level_type.rb'
- 'app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb'
- 'app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
@ -906,12 +881,6 @@ Graphql/Descriptions:
- 'app/graphql/types/tree/tree_type.rb'
- 'app/graphql/types/user_status_type.rb'
- 'app/graphql/types/user_type.rb'
- 'ee/app/graphql/ee/mutations/boards/issues/issue_move_list.rb'
- 'ee/app/graphql/ee/mutations/boards/lists/create.rb'
- 'ee/app/graphql/ee/mutations/issues/create.rb'
- 'ee/app/graphql/ee/mutations/issues/update.rb'
- 'ee/app/graphql/ee/resolvers/issues_resolver.rb'
- 'ee/app/graphql/ee/resolvers/namespace_projects_resolver.rb'
- 'ee/app/graphql/ee/types/board_list_type.rb'
- 'ee/app/graphql/ee/types/board_type.rb'
- 'ee/app/graphql/ee/types/boards/board_issue_input_base_type.rb'
@ -923,61 +892,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/ee/types/namespace_type.rb'
- 'ee/app/graphql/ee/types/project_type.rb'
- 'ee/app/graphql/ee/types/query_type.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/delete.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/mixins.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/update.rb'
- 'ee/app/graphql/mutations/boards/lists/update_limit_metrics.rb'
- 'ee/app/graphql/mutations/boards/update.rb'
- 'ee/app/graphql/mutations/boards/update_epic_user_preferences.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/destroy.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/update.rb'
- 'ee/app/graphql/mutations/clusters/agent_tokens/create.rb'
- 'ee/app/graphql/mutations/clusters/agent_tokens/delete.rb'
- 'ee/app/graphql/mutations/clusters/agents/create.rb'
- 'ee/app/graphql/mutations/clusters/agents/delete.rb'
- 'ee/app/graphql/mutations/concerns/mutations/shared_epic_arguments.rb'
- 'ee/app/graphql/mutations/epic_tree/reorder.rb'
- 'ee/app/graphql/mutations/epics/add_issue.rb'
- 'ee/app/graphql/mutations/epics/base.rb'
- 'ee/app/graphql/mutations/epics/create.rb'
- 'ee/app/graphql/mutations/epics/set_subscription.rb'
- 'ee/app/graphql/mutations/epics/update.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/create.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/destroy.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/oncall_schedule_base.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/update.rb'
- 'ee/app/graphql/mutations/instance_security_dashboard/add_project.rb'
- 'ee/app/graphql/mutations/instance_security_dashboard/remove_project.rb'
- 'ee/app/graphql/mutations/issues/common_ee_mutation_arguments.rb'
- 'ee/app/graphql/mutations/issues/promote_to_epic.rb'
- 'ee/app/graphql/mutations/issues/set_weight.rb'
- 'ee/app/graphql/mutations/iterations/create.rb'
- 'ee/app/graphql/mutations/namespaces/base.rb'
- 'ee/app/graphql/mutations/quality_management/test_cases/create.rb'
- 'ee/app/graphql/mutations/requirements_management/base_requirement.rb'
- 'ee/app/graphql/mutations/requirements_management/update_requirement.rb'
- 'ee/app/graphql/mutations/security/ci_configuration/configure_sast.rb'
- 'ee/app/graphql/mutations/vulnerabilities/confirm.rb'
- 'ee/app/graphql/mutations/vulnerabilities/dismiss.rb'
- 'ee/app/graphql/mutations/vulnerabilities/resolve.rb'
- 'ee/app/graphql/mutations/vulnerabilities/revert_to_detected.rb'
- 'ee/app/graphql/resolvers/board_groupings/epics_resolver.rb'
- 'ee/app/graphql/resolvers/boards/epic_boards_resolver.rb'
- 'ee/app/graphql/resolvers/ci/code_coverage_activities_resolver.rb'
- 'ee/app/graphql/resolvers/clusters/agents_resolver.rb'
- 'ee/app/graphql/resolvers/dast_site_profile_resolver.rb'
- 'ee/app/graphql/resolvers/dast_site_validation_resolver.rb'
- 'ee/app/graphql/resolvers/epics_resolver.rb'
- 'ee/app/graphql/resolvers/geo/registries_resolver.rb'
- 'ee/app/graphql/resolvers/requirements_management/requirements_resolver.rb'
- 'ee/app/graphql/resolvers/requirements_management/test_reports_resolver.rb'
- 'ee/app/graphql/resolvers/timelog_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities/issue_links_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_count_per_day_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_grade_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_history_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb'
- 'ee/app/graphql/types/admin/analytics/devops_adoption/segment_type.rb'
- 'ee/app/graphql/types/admin/analytics/devops_adoption/snapshot_type.rb'
- 'ee/app/graphql/types/boards/board_epic_type.rb'

View File

@ -1,49 +1,77 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-10-29 17:35:37 UTC using RuboCop version 0.89.1.
# on 2021-01-11 15:49:32 UTC using RuboCop version 0.91.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 310
# Offense count: 313
# Cop supports --auto-correct.
Capybara/CurrentPathExpectation:
Enabled: false
# Offense count: 210
# Offense count: 218
Capybara/VisibilityMatcher:
Enabled: false
# Offense count: 1903
# Offense count: 1
Gitlab/PolicyRuleBoolean:
Exclude:
- 'ee/app/policies/ee/identity_provider_policy.rb'
# Offense count: 5
Graphql/IDType:
Exclude:
- 'app/graphql/mutations/boards/issues/issue_move_list.rb'
# Offense count: 2054
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Enabled: false
# Offense count: 49
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: start_of_line, begin
Layout/BeginEndAlignment:
Exclude:
- 'app/controllers/groups/shared_projects_controller.rb'
- 'app/workers/concerns/reactive_cacheable_worker.rb'
- 'ee/app/services/security/token_revocation_service.rb'
- 'ee/lib/gitlab/analytics/cycle_analytics/summary/group/deploy.rb'
- 'ee/lib/gitlab/ci/config/entry/vault/secret.rb'
- 'lib/api/internal/base.rb'
- 'lib/atlassian/jira_connect/serializers/build_entity.rb'
- 'lib/gitlab/ci/jwt.rb'
- 'lib/gitlab/external_authorization/client.rb'
- 'lib/gitlab/phabricator_import/project_creator.rb'
- 'scripts/gitaly_test.rb'
# Offense count: 52
# Cop supports --auto-correct.
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: false
# Offense count: 610
# Offense count: 721
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/FirstArrayElementIndentation:
Enabled: false
# Offense count: 1535
# Offense count: 1592
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/FirstHashElementIndentation:
Enabled: false
# Offense count: 2754
# Offense count: 3019
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
@ -52,33 +80,47 @@ Layout/FirstHashElementIndentation:
Layout/HashAlignment:
Enabled: false
# Offense count: 64
# Offense count: 73
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 1313
# Offense count: 118
# Offense count: 163
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/MultilineOperationIndentation:
Enabled: false
# Offense count: 52
# Offense count: 11
# Cop supports --auto-correct.
Layout/RescueEnsureAlignment:
Exclude:
- 'app/models/blob_viewer/dependency_manager.rb'
- 'app/models/project.rb'
- 'app/services/prometheus/proxy_service.rb'
- 'app/workers/concerns/reactive_cacheable_worker.rb'
- 'app/workers/delete_stored_files_worker.rb'
- 'config/initializers/1_settings.rb'
- 'config/initializers/trusted_proxies.rb'
- 'lib/api/internal/base.rb'
- 'lib/gitlab/highlight.rb'
# Offense count: 53
# Cop supports --auto-correct.
Layout/SpaceAroundMethodCallOperator:
Enabled: false
# Offense count: 790
# Offense count: 725
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: require_no_space, require_space
Layout/SpaceInLambdaLiteral:
Enabled: false
# Offense count: 1110
# Offense count: 218
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
@ -86,7 +128,7 @@ Layout/SpaceInLambdaLiteral:
Layout/SpaceInsideBlockBraces:
Enabled: false
# Offense count: 501
# Offense count: 559
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
@ -96,7 +138,6 @@ Layout/SpaceInsideParens:
# Offense count: 18
Lint/BinaryOperatorWithIdenticalOperands:
Exclude:
- 'app/finders/concerns/time_frame_filter.rb'
- 'ee/spec/lib/ee/gitlab/application_context_spec.rb'
- 'spec/helpers/visibility_level_helper_spec.rb'
- 'spec/lib/gitlab/conan_token_spec.rb'
@ -110,6 +151,10 @@ Lint/BinaryOperatorWithIdenticalOperands:
- 'spec/models/repository_spec.rb'
- 'spec/models/ssh_host_key_spec.rb'
# Offense count: 83
Lint/ConstantDefinitionInBlock:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
Lint/DeprecatedOpenSSLConstant:
@ -118,7 +163,6 @@ Lint/DeprecatedOpenSSLConstant:
- 'ee/lib/gitlab/geo/oauth/logout_state.rb'
- 'lib/gitlab/conan_token.rb'
- 'lib/gitlab/gitaly_client.rb'
- 'lib/gitlab/kubernetes/helm/certificate.rb'
- 'lib/gitlab/kubernetes/helm/v2/certificate.rb'
- 'spec/lib/gitlab/conan_token_spec.rb'
- 'spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb'
@ -126,11 +170,25 @@ Lint/DeprecatedOpenSSLConstant:
- 'spec/support/shared_contexts/requests/api/conan_packages_shared_context.rb'
# Offense count: 1
Lint/FloatComparison:
Lint/DuplicateRequire:
Exclude:
- 'ee/app/models/ee/namespace.rb'
- 'ee/spec/lib/gitlab/auth/group_saml/user_spec.rb'
# Offense count: 157
# Offense count: 2
# Configuration parameters: AllowComments.
Lint/EmptyFile:
Exclude:
- 'db/seeds.rb'
- 'ee/db/geo/seeds.rb'
# Offense count: 8
# Cop supports --auto-correct.
Lint/IdentityComparison:
Exclude:
- 'spec/lib/gitlab/danger/weightage/maintainers_spec.rb'
- 'spec/lib/gitlab/danger/weightage/reviewers_spec.rb'
# Offense count: 184
# Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective:
Enabled: false
@ -153,13 +211,7 @@ Lint/MixedRegexpCaptureTypes:
- 'lib/gitlab/slash_commands/issue_new.rb'
- 'lib/gitlab/slash_commands/run.rb'
# Offense count: 1
# Cop supports --auto-correct.
Lint/NonDeterministicRequireOrder:
Exclude:
- 'rubocop/rubocop.rb'
# Offense count: 118
# Offense count: 141
# Cop supports --auto-correct.
Lint/RedundantCopDisableDirective:
Enabled: false
@ -169,12 +221,6 @@ Lint/SelfAssignment:
Exclude:
- 'spec/lib/gitlab/search_context/builder_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Lint/SendWithMixinArgument:
Exclude:
- 'config/initializers/trusted_proxies.rb'
# Offense count: 3
Lint/StructNewOverride:
Exclude:
@ -187,20 +233,63 @@ Lint/UnreachableLoop:
Exclude:
- 'qa/qa/runtime/feature.rb'
# Offense count: 5
# Configuration parameters: IgnoredMethods.
# Offense count: 22
# Cop supports --auto-correct.
# Configuration parameters: AllowComments.
Lint/UselessMethodDefinition:
Enabled: false
# Offense count: 7
# Configuration parameters: IgnoredMethods, Max.
Metrics/AbcSize:
Max: 59
Exclude:
- 'app/helpers/issuables_helper.rb'
- 'app/services/merge_requests/build_service.rb'
- 'app/services/projects/create_service.rb'
- 'lib/api/helpers.rb'
- 'lib/gitlab/lograge/custom_options.rb'
- 'lib/gitlab/rack_attack.rb'
- 'qa/qa/resource/repository/push.rb'
# Offense count: 13
# Configuration parameters: IgnoredMethods.
# Offense count: 15
# Configuration parameters: IgnoredMethods, Max.
Metrics/CyclomaticComplexity:
Max: 25
Exclude:
- 'app/services/projects/create_service.rb'
- 'app/services/system_hooks_service.rb'
- 'ee/app/controllers/ee/groups_controller.rb'
- 'ee/app/helpers/ee/groups_helper.rb'
- 'ee/lib/security/ci_configuration/sast_build_actions.rb'
- 'lib/banzai/filter/abstract_reference_filter.rb'
- 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/conflict/file.rb'
- 'lib/gitlab/danger/roulette.rb'
- 'lib/gitlab/diff/parser.rb'
- 'lib/gitlab/rack_attack.rb'
- 'lib/gitlab/sidekiq_cluster/cli.rb'
- 'lib/gitlab/utils/merge_hash.rb'
- 'lib/kramdown/parser/atlassian_document_format.rb'
- 'spec/support/cycle_analytics_helpers/test_generation.rb'
# Offense count: 13
# Configuration parameters: IgnoredMethods.
# Offense count: 15
# Configuration parameters: IgnoredMethods, Max.
Metrics/PerceivedComplexity:
Max: 25
Exclude:
- 'app/helpers/submodule_helper.rb'
- 'app/helpers/tab_helper.rb'
- 'app/services/projects/create_service.rb'
- 'ee/app/controllers/ee/groups_controller.rb'
- 'ee/app/helpers/ee/groups_helper.rb'
- 'ee/lib/security/ci_configuration/sast_build_actions.rb'
- 'lib/banzai/filter/abstract_reference_filter.rb'
- 'lib/banzai/renderer.rb'
- 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/conflict/file.rb'
- 'lib/gitlab/danger/roulette.rb'
- 'lib/gitlab/rack_attack.rb'
- 'lib/gitlab/sidekiq_cluster/cli.rb'
- 'lib/gitlab/utils/merge_hash.rb'
- 'spec/support/cycle_analytics_helpers/test_generation.rb'
# Offense count: 1
# Cop supports --auto-correct.
@ -208,7 +297,7 @@ Migration/DepartmentName:
Exclude:
- 'app/models/commit.rb'
# Offense count: 171
# Offense count: 184
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
@ -225,7 +314,7 @@ Naming/HeredocDelimiterCase:
- 'spec/support/helpers/repo_helpers.rb'
- 'spec/support/helpers/seed_repo.rb'
# Offense count: 263
# Offense count: 308
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
@ -239,7 +328,7 @@ Naming/MethodParameterName:
- 'lib/gitlab/diff/inline_diff.rb'
- 'spec/support/helpers/key_generator_helper.rb'
# Offense count: 191
# Offense count: 206
# Cop supports --auto-correct.
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName:
@ -251,12 +340,22 @@ Performance/AncestorsInclude:
Exclude:
- 'lib/gitlab/ci/config/extendable/entry.rb'
# Offense count: 39
# Cop supports --auto-correct.
Performance/BlockGivenWithExplicitBlock:
Enabled: false
# Offense count: 28
# Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop:
Enabled: false
# Offense count: 19
# Offense count: 37
# Cop supports --auto-correct.
Performance/ConstantRegexp:
Enabled: false
# Offense count: 18
# Cop supports --auto-correct.
Performance/Count:
Exclude:
@ -267,10 +366,9 @@ Performance/Count:
- 'spec/lib/gitlab/conflict/file_spec.rb'
- 'spec/lib/gitlab/git/tree_spec.rb'
- 'spec/models/ci/build_spec.rb'
- 'spec/support/matchers/exceed_query_limit.rb'
- 'spec/support_specs/helpers/active_record/query_recorder_spec.rb'
# Offense count: 15
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: SafeMultiline.
Performance/DeletePrefix:
@ -283,14 +381,13 @@ Performance/DeletePrefix:
- 'lib/gitlab/gfm/uploads_rewriter.rb'
- 'lib/gitlab/git/ref.rb'
- 'lib/gitlab/project_template.rb'
- 'lib/gitlab/repo_path.rb'
- 'lib/gitlab/setup_helper.rb'
- 'lib/gitlab/time_tracking_formatter.rb'
- 'spec/controllers/projects/artifacts_controller_spec.rb'
- 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb'
- 'spec/support/helpers/test_env.rb'
# Offense count: 6
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: SafeMultiline.
Performance/DeleteSuffix:
@ -299,7 +396,6 @@ Performance/DeleteSuffix:
- 'app/workers/concerns/application_worker.rb'
- 'ee/app/models/geo/upload_registry.rb'
- 'ee/app/workers/geo/file_download_dispatch_worker/attachment_job_finder.rb'
- 'lib/gitlab/repo_path.rb'
- 'lib/sentry/client/issue.rb'
# Offense count: 13
@ -313,7 +409,11 @@ Performance/Detect:
- 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb'
- 'spec/models/event_spec.rb'
# Offense count: 19
# Offense count: 116
Performance/MethodObjectAsBlock:
Enabled: false
# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect.
Performance/StringInclude:
@ -330,23 +430,30 @@ Performance/StringInclude:
- 'qa/qa/ee/page/merge_request/show.rb'
- 'qa/qa/specs/runner.rb'
- 'spec/features/projects/jobs_spec.rb'
- 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb'
- 'spec/spec_helper.rb'
- 'spec/support_specs/helpers/active_record/query_recorder_spec.rb'
# Offense count: 9
# Offense count: 18
# Cop supports --auto-correct.
Performance/Sum:
Exclude:
- 'app/controllers/projects/pipelines/tests_controller.rb'
- 'app/models/application_setting_implementation.rb'
- 'app/models/ci/pipeline.rb'
- 'app/services/issues/export_csv_service.rb'
- 'ee/spec/lib/gitlab/elastic/bulk_indexer_spec.rb'
- 'lib/api/entities/issuable_time_stats.rb'
- 'lib/container_registry/tag.rb'
- 'lib/declarative_policy/rule.rb'
- 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/ci/reports/test_suite_comparer.rb'
- 'lib/gitlab/diff/file.rb'
- 'lib/gitlab/sherlock/transaction.rb'
- 'lib/gitlab/usage_data.rb'
- 'lib/peek/views/detailed_view.rb'
- 'spec/models/namespace/root_storage_statistics_spec.rb'
# Offense count: 13879
# Offense count: 14717
# Configuration parameters: Prefixes.
# Prefixes: when, with, without
RSpec/ContextWording:
@ -359,65 +466,50 @@ RSpec/EmptyExampleGroup:
- 'ee/spec/services/personal_access_tokens/revoke_invalid_tokens_spec.rb'
- 'spec/services/projects/prometheus/alerts/notify_service_spec.rb'
# Offense count: 1310
# Offense count: 1365
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: method_call, block
RSpec/ExpectChange:
Enabled: false
RSpec/ExpectGitlabTracking:
Exclude:
- 'ee/spec/requests/api/visual_review_discussions_spec.rb'
- 'ee/spec/services/epics/issue_promote_service_spec.rb'
- 'spec/controllers/groups/registry/repositories_controller_spec.rb'
- 'spec/controllers/projects/registry/repositories_controller_spec.rb'
- 'spec/controllers/projects/registry/tags_controller_spec.rb'
- 'spec/controllers/projects/settings/operations_controller_spec.rb'
- 'spec/lib/api/helpers_spec.rb'
- 'spec/requests/api/project_container_repositories_spec.rb'
- 'spec/support/shared_examples/controllers/trackable_shared_examples.rb'
- 'spec/support/shared_examples/requests/api/discussions_shared_examples.rb'
- 'spec/support/shared_examples/requests/api/packages_shared_examples.rb'
- 'spec/support/shared_examples/requests/api/tracking_shared_examples.rb'
# Offense count: 888
# Offense count: 889
RSpec/ExpectInHook:
Enabled: false
# Offense count: 15945
# Offense count: 16403
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 40
# Offense count: 2297
# Offense count: 2352
# Cop supports --auto-correct.
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
# SupportedStyles: inflected, explicit
RSpec/PredicateMatcher:
Enabled: false
# Offense count: 98
# Offense count: 112
RSpec/RepeatedExampleGroupBody:
Enabled: false
# Offense count: 213
# Offense count: 219
RSpec/RepeatedExampleGroupDescription:
Enabled: false
# Offense count: 636
# Offense count: 655
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: and_return, block
RSpec/ReturnFromStub:
Enabled: false
# Offense count: 574
# Offense count: 596
# Cop supports --auto-correct.
RSpec/ScatteredLet:
Enabled: false
# Offense count: 4
# Offense count: 6
RSpec/ScatteredSetup:
Exclude:
- 'spec/requests/api/jobs_spec.rb'
@ -429,7 +521,7 @@ RSpec/VariableDefinition:
Exclude:
- 'spec/initializers/mail_encoding_patch_spec.rb'
# Offense count: 25
# Offense count: 24
# Configuration parameters: EnforcedStyle, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
RSpec/VariableName:
@ -437,13 +529,12 @@ RSpec/VariableName:
- 'spec/features/projects/import_export/import_file_spec.rb'
- 'spec/features/task_lists_spec.rb'
- 'spec/initializers/mail_encoding_patch_spec.rb'
- 'spec/lib/gitlab/experimentation_spec.rb'
- 'spec/models/board_spec.rb'
- 'spec/support/shared_contexts/url_shared_context.rb'
- 'spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb'
- 'spec/support/shared_examples/services/boards/boards_list_service_shared_examples.rb'
# Offense count: 27
# Offense count: 25
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/models/**/*.rb
@ -472,25 +563,25 @@ Rails/BelongsTo:
- 'app/models/deployment.rb'
- 'app/models/environment.rb'
# Offense count: 84
# Offense count: 90
# Configuration parameters: Database, Include.
# SupportedDatabases: mysql, postgresql
# Include: db/migrate/*.rb
Rails/BulkChangeTable:
Enabled: false
# Offense count: 151
# Offense count: 153
# Cop supports --auto-correct.
Rails/ContentTag:
Enabled: false
# Offense count: 270
# Offense count: 300
# Configuration parameters: Include.
# Include: db/migrate/*.rb
Rails/CreateTableWithTimestamps:
Enabled: false
# Offense count: 323
# Offense count: 347
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Rails/FilePath:
@ -512,13 +603,13 @@ Rails/FindById:
- 'spec/finders/concerns/finder_methods_spec.rb'
- 'spec/finders/concerns/finder_with_cross_project_access_spec.rb'
# Offense count: 329
# Offense count: 346
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Enabled: false
# Offense count: 507
# Offense count: 539
# Configuration parameters: Include.
# Include: app/helpers/**/*.rb
Rails/HelperInstanceVariable:
@ -542,7 +633,7 @@ Rails/IndexBy:
- 'lib/gitlab/database/count/reltuples_count_strategy.rb'
- 'lib/gitlab/language_detection.rb'
# Offense count: 44
# Offense count: 45
# Cop supports --auto-correct.
Rails/IndexWith:
Enabled: false
@ -552,7 +643,7 @@ Rails/Inquiry:
Exclude:
- 'spec/helpers/labels_helper_spec.rb'
# Offense count: 112
# Offense count: 115
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/InverseOf:
@ -580,33 +671,34 @@ Rails/MailerName:
Exclude:
- 'app/mailers/notify.rb'
# Offense count: 48
# Offense count: 51
# Cop supports --auto-correct.
Rails/NegateInclude:
Enabled: false
# Offense count: 41
# Offense count: 44
# Cop supports --auto-correct.
Rails/Pick:
Enabled: false
# Offense count: 113
# Offense count: 110
# Cop supports --auto-correct.
Rails/Pluck:
Enabled: false
# Offense count: 38
# Offense count: 39
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: **/Rakefile, **/*.rake
Rails/RakeEnvironment:
Enabled: false
# Offense count: 52
# Offense count: 58
# Cop supports --auto-correct.
Rails/RedundantForeignKey:
Enabled: false
# Offense count: 1
Rails/RenderInline:
Exclude:
- 'ee/app/controllers/sitemap_controller.rb'
@ -621,18 +713,23 @@ Rails/ShortI18n:
- 'app/uploaders/content_type_whitelist.rb'
- 'spec/views/shared/runners/show.html.haml_spec.rb'
# Offense count: 1043
# Offense count: 1080
# Configuration parameters: ForbiddenMethods, AllowedMethods.
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
Rails/SkipsModelValidations:
Enabled: false
# Offense count: 202
# Offense count: 251
# Cop supports --auto-correct.
Rails/SquishedSQLHeredocs:
Enabled: false
# Offense count: 37
# Offense count: 45
# Cop supports --auto-correct.
Rails/WhereEquals:
Enabled: false
# Offense count: 40
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: exists, where
@ -661,13 +758,12 @@ Security/YAMLLoad:
Style/AccessorGrouping:
Enabled: false
# Offense count: 13
# Offense count: 12
# Cop supports --auto-correct.
Style/ArrayCoercion:
Exclude:
- 'app/controllers/admin/ci/variables_controller.rb'
- 'app/controllers/groups/variables_controller.rb'
- 'app/controllers/import/bulk_imports_controller.rb'
- 'app/controllers/projects/variables_controller.rb'
- 'db/migrate/20190620105427_change_null_private_profile_to_false.rb'
- 'db/post_migrate/20190812070645_migrate_private_profile_nulls.rb'
@ -679,7 +775,7 @@ Style/ArrayCoercion:
- 'ee/lib/ee/banzai/pipeline/gfm_pipeline.rb'
- 'spec/support/helpers/lfs_http_helpers.rb'
# Offense count: 176
# Offense count: 183
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: percent_q, bare_percent
@ -693,11 +789,27 @@ Style/BisectedAttrAccessor:
- 'lib/system_check/base_check.rb'
- 'qa/qa/resource/api_fabricator.rb'
# Offense count: 37
# Offense count: 36
# Cop supports --auto-correct.
Style/CaseLikeIf:
Enabled: false
# Offense count: 15
Style/CombinableLoops:
Exclude:
- 'app/models/application_setting.rb'
- 'ee/db/fixtures/development/30_customizable_cycle_analytics.rb'
- 'ee/lib/gitlab/audit/events/preloader.rb'
- 'ee/spec/finders/snippets_finder_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/remove_duplicate_cs_findings_spec.rb'
- 'rubocop/code_reuse_helpers.rb'
- 'spec/features/merge_request/user_suggests_changes_on_diff_spec.rb'
- 'spec/finders/packages/group_packages_finder_spec.rb'
- 'spec/migrations/cleanup_optimistic_locking_nulls_pt2_fixed_spec.rb'
- 'spec/migrations/cleanup_optimistic_locking_nulls_spec.rb'
- 'spec/requests/api/members_spec.rb'
- 'spec/support/shared_examples/features/protected_branches_access_control_ce_shared_examples.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
@ -723,7 +835,7 @@ Style/EachWithObject:
Style/EmptyElse:
Enabled: false
# Offense count: 193
# Offense count: 197
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, expanded
@ -737,94 +849,99 @@ Style/ExpandPathArguments:
- 'cable/config.ru'
- 'config.ru'
# Offense count: 118
# Offense count: 116
# Cop supports --auto-correct.
Style/ExplicitBlockArgument:
Enabled: false
# Offense count: 521
# Offense count: 555
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
Enabled: false
# Offense count: 48
# Offense count: 61
# Cop supports --auto-correct.
Style/GlobalStdStream:
Enabled: false
# Offense count: 835
# Offense count: 879
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Enabled: false
# Offense count: 93
# Offense count: 56
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces
Style/HashAsLastArrayItem:
Enabled: false
# Offense count: 55
# Offense count: 66
# Cop supports --auto-correct.
Style/HashEachMethods:
Enabled: false
# Offense count: 30
# Offense count: 33
# Configuration parameters: AllowIfModifier.
Style/IfInsideElse:
Enabled: false
# Offense count: 1798
# Offense count: 1888
# Cop supports --auto-correct.
Style/IfUnlessModifier:
Enabled: false
# Offense count: 447
# Offense count: 68
# Cop supports --auto-correct.
Style/KeywordParametersOrder:
Enabled: false
# Offense count: 431
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: line_count_dependent, lambda, literal
Style/Lambda:
Enabled: false
# Offense count: 18
# Offense count: 20
Style/MissingRespondToMissing:
Enabled: false
# Offense count: 32
# Offense count: 35
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength.
# SupportedStyles: skip_modifier_ifs, always
Style/Next:
Enabled: false
# Offense count: 95
# Offense count: 98
# Cop supports --auto-correct.
# Configuration parameters: EnforcedOctalStyle.
# SupportedOctalStyles: zero_with_o, zero_only
Style/NumericLiteralPrefix:
Enabled: false
# Offense count: 132
# Offense count: 135
# Cop supports --auto-correct.
Style/ParallelAssignment:
Enabled: false
# Offense count: 2473
# Offense count: 2601
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Enabled: false
# Offense count: 246
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
Enabled: false
# Offense count: 66
# Offense count: 65
# Cop supports --auto-correct.
Style/RedundantAssignment:
Enabled: false
@ -846,91 +963,102 @@ Style/RedundantFetchBlock:
Style/RedundantFileExtensionInRequire:
Enabled: false
# Offense count: 260
# Offense count: 220
# Cop supports --auto-correct.
Style/RedundantFreeze:
Enabled: false
# Offense count: 167
# Offense count: 182
# Cop supports --auto-correct.
Style/RedundantInterpolation:
Enabled: false
# Offense count: 11
# Offense count: 8
# Cop supports --auto-correct.
Style/RedundantRegexpCharacterClass:
Exclude:
- 'app/models/concerns/taskable.rb'
- 'ee/lib/ee/gitlab/path_regex.rb'
- 'lib/gitlab/authorized_keys.rb'
- 'lib/gitlab/fogbugz_import/repository.rb'
- 'lib/gitlab/prometheus/internal.rb'
- 'lib/gitlab/quick_actions/substitution_definition.rb'
- 'lib/gitlab/regex.rb'
- 'spec/features/merge_request/user_views_open_merge_request_spec.rb'
- 'spec/tasks/gitlab/usage_data_rake_spec.rb'
# Offense count: 250
# Offense count: 270
# Cop supports --auto-correct.
Style/RedundantRegexpEscape:
Enabled: false
# Offense count: 868
# Offense count: 920
# Cop supports --auto-correct.
Style/RedundantSelf:
Enabled: false
# Offense count: 179
# Offense count: 2
# Cop supports --auto-correct.
Style/RedundantSelfAssignment:
Exclude:
- 'app/models/concerns/issuable.rb'
- 'spec/db/schema_spec.rb'
# Offense count: 196
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Enabled: false
# Offense count: 49
# Offense count: 50
# Cop supports --auto-correct.
Style/RescueModifier:
Enabled: false
# Offense count: 329
# Offense count: 346
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError:
Enabled: false
# Offense count: 104
# Offense count: 115
# Cop supports --auto-correct.
Style/SingleArgumentDig:
Enabled: false
# Offense count: 47
# Offense count: 45
# Cop supports --auto-correct.
Style/SlicingWithRange:
Enabled: false
# Offense count: 109
# Offense count: 61
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Enabled: false
# Offense count: 121
# Cop supports --auto-correct.
# Configuration parameters: .
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names
# Offense count: 516
# Offense count: 545
# Cop supports --auto-correct.
Style/StringConcatenation:
Enabled: false
# Offense count: 103
# Offense count: 108
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
Enabled: false
# Offense count: 276
# Offense count: 292
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
Style/SymbolProc:
Enabled: false

View File

@ -2,10 +2,11 @@
documentation](doc/development/changelog.md) for instructions on adding your own
entry.
## 13.7.8 (2021-03-04)
## 13.8.5 (2021-03-04)
### Security (5 changes)
### Security (6 changes)
- Fix XSS in wiki author email and name.
- Bump thrift gem to 0.14.0.
- Allow only owners to manage group variables.
- Do not store marshalled sessions ids in Redis.
@ -13,7 +14,7 @@ entry.
- Fix XSS vulnerability for swagger file viewer.
## 13.7.7 (2021-02-11)
## 13.8.4 (2021-02-11)
### Security (9 changes)
@ -28,7 +29,15 @@ entry.
- Prevent Server-side Request Forgery for Prometheus when secured by Google IAP.
## 13.7.6 (2021-02-01)
## 13.8.3 (2021-02-05)
### Fixed (2 changes)
- Revert multipart URL optimization for AWS S3. !52561
- Fix regression with old wiki image uploads. !52656
## 13.8.2 (2021-02-01)
### Security (5 changes)
@ -39,12 +48,370 @@ entry.
- Add routes for unmatched url for not-get requests.
## 13.7.5 (2021-01-25)
## 13.8.1 (2021-01-26)
### Fixed (2 changes, 1 of them is from the community)
### Fixed (3 changes)
- New project guidelines are no longer displayed. !50736 (Roger Meier)
- Cancel artifact expiry backfill background jobs. !51821
- Fix LFS not working with S3 specific-storage settings. !52296
- Fix missing setting LDAP servers. !52512
## 13.8.0 (2021-01-22)
### Security (4 changes, 1 of them is from the community)
- The NuGet endpoints will no longer ignore an invalid username when a personal access token or deploy token is passed via HTTP Basic authentication. !38627 (Ethan Reesor (@firelizzard))
- Update WEBrick to v1.6.1. !50720
- Prevent user-defined variables from being used by non-maintainers. !51682
- Upgrade Workhorse to 8.58.2.
### Removed (2 changes)
- Drop group_id column from compliance_management_frameworks table. !50829
- Remove deprecated generic alert integration in favor of HTTP Integrations. !50913
### Fixed (91 changes, 35 of them are from the community)
- Deduplicate labels with identical title and group. !37148
- Remove diff display preferences and file tree from changes empty state. !43467
- Upgrade to Grape v1.5.0. !44554
- Fix database timeout errors when removing expired job artifacts. !47496
- Return release milestones in predictable order. !47700
- Fix multiple simultaneous requests for vulnerabilities on pipeline security tab. !48426
- Remove duplicate service records. !49463
- Add LaTeX support for Jupyter Notebooks. !49497
- Fix confusing button text when importing from GitHub. !49684 (Kev @KevSlashNull)
- Fix identicon text color in dark mode. !49785 (@yo)
- Fix installation of Knative under Helm 3. !49843
- Hide inoperable group search Releases filter. !50010
- Fix visibility level validation for deep nested forks. !50081
- Change type of CiJob.needs. !50192
- Handle git errors when cleaning up MR refs. !50250
- Fix over-eagerly updating Web IDE Live Preview. !50255
- Persist updated_at value in state change events. !50272
- Enlarge the timeline toggle button. !50284
- Hide "Actions" label on group members view if no action buttons exist. !50304
- Fix bug with snippets in HEAD when default branch is not master. !50366
- Add project scope to ci clint graphql endpoint. !50418
- Fix the graphQL type for container repository tags. !50419
- Allow more actions on group members. !50445
- Don't allow filtering by release tag on groups. !50457
- Flash transfer errors in the admin project controller. !50541 (Vincent Fazio)
- Update cluster-applications to v0.37.0. !50548
- Fix codeowners superseding web ide and single file edit. !50608
- Update Terraform Pipline templaes to support 0.14 lockfile cache. !50647 (Aurelian Shuttleworth)
- Fix issue with the `default_merge_refs` feature flag removing version to version diffs. !50671
- Fix LDAP override throws 404 when member has Minimal access. !50680
- Maven will return the most recent maven-metadata.xml file if there are multiple matches accross different projects. !50700
- Avoid 409 StaleObjectError errors with /rebase. !50719
- New project guidelines are no longer displayed. !50736 (Roger Meier)
- Add RateLimit-* headers to RackAttack responses. !50833 (adam-moss)
- Fix 500 error on repository settings access when repository is empty. !50844 (Diego Louzán)
- Update toast position on set status. !50886
- Fix duplicated toggle button showing on right sidebar when signed out. !50892
- Fix fork icon shrinks if branch name is very long. !50915 (Kev @KevSlashNull)
- Fix 'copy sha' in 'add previous commits' modal doesn't copy. !50921 (Kev @KevSlashNull)
- Fix large S3 uploads failing to finalize. !50922
- Fix webhook badge color in darkmode. !50943 (Yogi (@yo))
- Remove border radius for sidekiq iframe card. !50955 (Yogi (@yo))
- Align checkbox in system hooks page in admin. !50958 (Yogi (@yo))
- Fix import issues button style. !50969 (Yogi (@yo))
- Fix mobile layout Error Tracking details page. !50970 (Kev @KevSlashNull)
- Fix cobertura parser when there is an empty sources node. !50971
- Fix branch name overflows in profile activity section. !50975 (Kev @KevSlashNull)
- Fix abuse reports contains html and does not show repoter. !50983 (Kev @KevSlashNull)
- Rename button "CI lint" to "CI Lint" on jobs page. !50987 (Kev @KevSlashNull)
- Align admin notes label to the left. !50992 (Kev @KevSlashNull)
- Fix multiple errors in custom server hook render improperly. !51001 (Kev @KevSlashNull)
- Fix Jira MR status not syncing by making workers idempotent. !51006
- Show status of snippet author in header. !51030 (Kev @KevSlashNull)
- Fix slack application helper card. !51034 (Yogi (@yo))
- Remove margin top for snippets empty state. !51038 (Yogi (@yo))
- Invalidate reviews counter cache when MR gets closed/merged/reopened. !51055
- Fix merge request analytics page filtering when multiple labels are given. !51060
- Fix admin project overview badge alignment. !51066 (Kev @KevSlashNull)
- Strip newline from commit description on project overview. !51099 (Kev @KevSlashNull)
- Fix alignment of protected tag and branch labels on mobile. !51100 (Kev @KevSlashNull)
- Fix 500 errors entering a webhook URL not encoded. !51109
- Fix long deploy token name overflows revocation modal. !51114 (Kev @KevSlashNull)
- Use an empty body when sending a file with X-Sendfile. !51115
- Ensure Rake DB create doesn't fail when LDAP is enabled. !51132
- Fix runner admin is missing CI status styles. !51158 (Kev @KevSlashNull)
- Fix jobs admin is missing CI status styles. !51161 (Kev @KevSlashNull)
- Fix color of hamburger in dark mode. !51168 (Kev @KevSlashNull)
- Fix padding of user admin search bar on mobile. !51170 (Kev @KevSlashNull)
- Make todo filter sort input full width on mobile. !51171 (Kev @KevSlashNull)
- Correctly handle Gitaly being unavailable in more locations. !51222
- Prevent rebase from being run in quick action when there are conflicts. !51243
- Fix cut off line number in file blame. !51259
- Add margin to user chat settings. !51282 (Yogi (@yo))
- Invalidate reviews counter cache when MR gets created. !51316
- Forbid snippet pushes when repo is read-only. !51318
- Fix tertiary button color in dark mode. !51349
- Fix table columm shift with table-layout fixed. !51416
- Conditionally show card footer in single group page in admin. !51426 (Yogi (@yo))
- Fix argument type for background migration. !51475
- Correct status indicator for jobs groups when failure is allowed. !51478 (Sune Keller (sirlatrom))
- In WebIDE switch files before closing the active one. !51483
- Fix behavior of maven_duplicates_allowed setting so new Maven packages can be uploaded. !51524
- Fix script typo in secret detection template causing the detection to be skipped. !51544 (Vicken Simonian @vicken.papaya)
- Rename Backlog list to Open in issue boards. !51562
- Update GraphqlExtractor return value to be original hash. !51596
- Fixed applied message showing before discussion gets resolved. !51605
- Generate page-info for connections of preloaded associations. !51642
- Fix typo in notice displayed when Design Management requires LFS to be enabled. !51644
- Fix coverage not showing for inline diffs. !51652
- Fix issues when Web IDE commits to new branch. !51654
- Remove EE references from FOSS code. !51832
### Deprecated (2 changes)
- Deprecate prometheus.listen_address and prometheus.enable. !50500
- Refactor(opsgenie): remove Opsgenie integration frontend code from Incident management. !50525
### Changed (75 changes, 9 of them are from the community)
- Increase the complexity score of GraphQL MergeRequest#approved, MergeRequest#approvalsLeft and Repository#exists fields as they can call Gitaly. !47039
- Move deploy boards to Core. !47147
- Improve error message when username and namespace conflict. !47537
- Improve error messages when adding namespaces in Jira Connect App. !48651
- Update puma & puma_worker_killer to upstream. !48897
- Replace dropdown-input-fa-color with gray-500. !49213
- Adds MergeRequest.reviewers to GraphQL API. !49707
- Reorganize project member management into tabs. !49764
- Standardize page title styles on all wiki pages. !49777
- Ensure container_expiration_policy keep_n is an integer. !49805 (Mathieu Parent)
- When retrying jobs associate subsequent jobs with triggering user. !49833
- Allow collaboration on merge requests across forks by default. !49904 (Jonston Chan @JonstonChan)
- Add PostgreSQL trigger to maintain projects.has_external_wiki. !49916
- Limit the number of container tags to delete when deleting them in bulk. !49961
- Remove extra space in API 403 Forbidden error message. !50016
- Enable collect_package_events_redis by default. !50092
- Remove total_pipeline_duration from project_type. !50093
- Use Patroni as the default in the replication docs. !50101
- Fix package event metrics aggregation. !50108
- Upgrade CodeQuality version in CI template to 0.85.19. !50118
- Defer tagsCount & add startup.js to container registry. !50147
- Update ci config type for GraphQL to use connection_type. !50160
- [RUN-AS-IF-FOSS] Move to `createBoard` mutation instead of REST API call + `updateBoard`. !50171
- Adjust container registry metadata during loading. !50181
- Allow group owners and auditors to login to SSO-enforced groups without SSO. !50199
- Update .net Project Template Archive. !50321
- Add button to edit custom Wiki sidebar. !50323 (Frank Li)
- Update Rails Project Template archive. !50325
- Updated Express Project Template archive. !50326
- Change clusters.helm_major_version default to 3. !50399
- More concise pipeline notification emails. !50405
- Rename coverage report sidekiq queue. !50424
- Use a dynamic segment not depending on the package id for Debian files. !50433 (Mathieu Parent)
- Remove lfs_chunked_encoding feature flag. !50557
- Adds annotations as part of metadata for CiliumNetworkPolicies wrapper. !50586
- Add manual bridge support to api. !50634
- Add issue link to due date emails. !50642
- Updates graphql gitlab-ci.yml linter implementation. !50664
- Add additional fields to diff_metadata.json endpoint. !50666
- Check namespace package settings when creating Maven packages. !50691
- Change onboarding actions table to use one record per namespace. !50711
- Improve the reliability and observability of the container registry client. !50750
- Remove inactive integrations indicator in index and show pages. !50753
- Add tags count and cleanup status to registry details. !50756
- Update merge request status box without reloading page. !50761
- Add error handling in the container registry delete tags service. !50763
- Update the maven package finder. !50774
- Move Group Migration entities import to individual sidekiq jobs. !50781
- Prevent locked Terraform states from being deleted. !50798
- API: Exposes errors in lint endpoint. !50891
- Indent child form elements in integrations form. !50929
- Wiki edit: automatically focus on the content field. !50941 (Jacopo Beschi @jacopo-beschi)
- Limit Group Migration extractors and loaders to 1 per pipeline. !50951
- Add space and helper to the group members page. !50954 (Yogi (@yo))
- Add access request endpoint to OpenAPI standard. !51000 (Jim Cser)
- Use GlBadge for badges in pipeline_url.vue. !51058 (Kev @KevSlashNull)
- Migrate `deleteBoard` board_store function to GraphQL mutation. !51069
- Skip secret_detection on tags. !51129
- Remove pagination from Deployment Frequency API endpoint. !51137
- Updates regex for group_name to support numbers in job name. !51157
- Migrate GitLab UI button for Merge Request Approvals settings. !51159 (George Tsiolis)
- Enable reviewer_approval_rules by default. !51183
- Remove limit of four features per plan. !51264
- Disable submit button on wiki if no title and content. !51272
- Wiki: Add author avatar and link. !51273
- Update the DAST latest template to run when configured even if the user doesn't have sufficient permission. !51279
- Resolve Grouping/swimlanes choice should persist after board has been edited. !51317
- Extract expired pipeline artifacts removal service into it's own background worker. !51323
- Bump workhorse to 8.59.0. !51329
- Update Issue Incidents to allow the milestones feature to be used in the sidebar and quick actions. !51456
- Remove test_failure_history flag. !51464
- Update pipeline graphs on CI/CD Analytics page to use GraphQL endpoint. !51504
- Redirect deprecated profile paths to scoped path. !51646
- Default enable set_user_availability_status. !51668
- Add visibility mismatch warning to the branch chooser. !51671
### Performance (16 changes)
- Lower /explore page limit. !50233
- Cache license data in a process-memory cache. !50318
- Fix N+1 queries with loading group issues with GraphQL. !50328
- Performance improvements for CI GraphQL resources. !50386
- Index ci_pipelines on pipeline_schedule_id and id. !50478
- Fix N+1 when rendering snippets in the dashboard. !50569
- During group deletion, only enqueue jobs for project_authorizations refresh if the group being deleted has other groups shared with it. !50617
- Switch to 2x faster PRNG. !50811
- Improve the database query performance on the pipeline loading in merge requests. !50818
- Reduce per-page size in release index pages for loading faster. !50934
- Spread monthly CI minutes reset from 8 to 24 hours. !51084
- CI: use commit SHA in persistent refspec. !51208
- Use Puma `nakayoshi_fork`. !51467
- Limit rendering of commit messages. !51485
- Remove pipeline status from /explore page. !51621
- Lower allocations when building nav. !51628
### Added (66 changes, 6 of them are from the community)
- Add ability to get admins via REST and GraphQL API. !46244
- Add flutter CI/CD template. !46968
- Add migration to swap partitioned audit_events. !47581
- Add the NuGet group level API. !48356
- Instrument viewing merge request diffs file by file. !48470
- Allow HTTP Basic Auth and deploy token authentication for generic packages. !48540 (Moshe Katz @kohenkatz)
- Stop unlinking the fork when changing visibility. !49013
- New user/issue specific email address for creating/forwarding to an issue. !49050
- Add GraphQL mutation to create on-call rotations. !49206
- Add ability for admins to create PAT for other users via API. !49222
- Add snippet repository storage move API endpoints. !49228
- Add keep latest artifact option for projects. !49256
- Debian Group and Project Distributions. !49405 (Mathieu Parent)
- Add table for tracking on-call shifts. !49423
- Add 5-minute-production-app CI template. !49487
- UI to opt out of keeping the artifacts from the last job at project level. !49500
- Debian File Metadata. !49692 (Mathieu Parent)
- Add epic board list table. !49728
- Enable OAuth PKCE flow. !49756
- Add artifacts:public boolean. !49775
- Add a quick action for /rebase. !49800
- Populate `finding_uuid` attribute for the existing `vulnerability_feedback` records. !49807
- Expose hide_backlog_list and hide_closed_list to project and group boards REST API. !49815 (Mathieu Parent)
- Expose notes resolved_at via API. !49821 (Lee Tickett)
- Add toggle to disable Operations in settings. !49919
- Add rake gitlab:git:checksum_projects. !49965
- Extend MergeRequestFinder to search by squash and merge commits. !49968
- Add delete metric image REST API endpoint. !50043
- Add namespace settings to allow or disallow duplicate Maven packages. !50104
- Add copy email to issue sidebar. !50127
- Add rake task for migrating legacy pages storage to zip deployments. !50153
- Project Template for Kotlin native. !50162
- Track usage for Terraform State API. !50224
- Add group MR approval settings table. !50256
- Add DevOps adoption end_time column. !50257
- Auto-assign merge request author when creating from issue. !50263
- Added epic board position database index. !50277
- Include the user id in the webhook payload. !50287
- Add project config path as a predefined project variable. !50301
- Send email when group member expiry is updated. !50310
- Implement variables for pipeline job rules. !50501
- Add DAST.latest.gitlab-ci.yml. !50539
- Add `dismissal_reason` column into the `vulnerability_feedback` table. !50632
- Add setting to enable Invisible Captcha. !50650
- Add include_versionless param to the Package API. !50669
- Allow custom response to be set when rate limits are exceeded. !50693
- Exposed web_path and web_url fields in Board's GraphQL API. !50947
- Add aggregate/union visit tracking for Compliance features. !50978
- Display Artifacts Dropdown on MR Pipeline Widget. !50998
- Add composer details GraphQL type and query. !51059
- Add skipped status to deployments. !51068
- Persist 'squash_commit_sha' when squashing. !51074
- Add confidentiality filtering to the epics REST API and GraphQL endpoints. !51105
- Add API command to remove pending member invitation. !51134
- Add configurable Gitpod button within projcet repository page. !51197
- Allow users to use IssueDeployedToProduction VSA event. !51199
- Show all quick actions in `/` autocomplete. !51239
- Debian Group and Project Distribution Architectures. !51265 (Mathieu Parent)
- Initially sync Merge Requests with Jira when a namespace is added through the GitLab for Jira app. !51341
- Adding /reviewer and /remove_reviewer aliases and specs. !51384
- Instrument CI template usage across projects. !51391
- Control job status using exit codes. !51439
- Enables the CI Pipeline Editor feature as a way to edit the GitLab CI/CD configuration. !51484
- Allow resetting group and instance level integrations. !51507
- Designate optional sections in the codeowners file. !51643
- Enable CI visualization by default. !51701
### Other (74 changes, 37 of them are from the community)
- Add a new Ruby API for specifying allowed authentication mechanisms for REST API endpoints. !38627 (Ethan Reesor (@firelizzard))
- Migrate-Bootstrap-dropdown-to-GitLab-UI-GlDropdown-in-app/assets/javascripts/vue_shared/components/pikaday.vue. !41458 (nuwe1)
- Add Icons to headings in system info on admin panel. !46618 (Yogi (@yo))
- Backfill artifact expiry date. !47723
- Convert navigation_tabs.vue to gl-tabs. !47841
- Fix UI on global breadcrumb on Project/Group Container Registry. !48288 (Takuya Noguchi)
- Dynamically load gapi on GKE cluster creation pages. !49512
- Update pipeline alert text to be more readable. !49575
- Remove users#show.json completely. !49670 (Takuya Noguchi)
- Visually enhance the difference between code that has and does not have test coverage. !49724
- Updated UI text to match style guidelines. !49871
- Update documentation for setting up database replication with Patroni on a Geo secondary node. !49986
- Disable auto admin mode for lib specs. !50056 (Diego Louzán)
- Add documentation for new Snippet repository storage move API. !50151
- Propagate client identity to gitaly. !50161
- Centered Markdown Preview in Web IDE with a set max width to limit the container size. !50291 (Mehul Sharma)
- Migrates the alert on the new branch page. !50307
- Fully disable auto admin mode and migrate remaining specs. !50331 (Diego Louzán)
- Refactor specs around gpg_keys in users_controller_spec.rb. !50337 (Takuya Noguchi)
- Refactor specs around ssh_keys in users_controller_spec.rb. !50338 (Takuya Noguchi)
- Improve badges UI text. !50351
- Update error message used in boards sidebar subscription. !50352
- Update GitLab Runner Helm Chart to 0.24.0. !50377
- Update Auto DevOps UI text to match style guidelines. !50398 (Amy Qualls @aqualls)
- Updated UI text to match style guidelines. !50403
- Improve service desk UI text. !50407
- Replace user controller spec with its request spec. !50435 (Takuya Noguchi)
- Updated UI text to match style guidelines. !50475 (Amy Qualls @aqualls)
- Updated UI text to match style guidelines. !50476
- Updated UI text to make runner lowercase. !50477
- Change failure message of missing job needs. !50492
- [Commit Page] Migrate to GlModal for revert commit. !50522
- Updated link text to match style guidelines. !50555
- Fix text color for 'no estimate or time spent' message in time tracker component. !50558
- Migrate runner_setup_controller_spec.rb to request spec. !50600 (Takuya Noguchi)
- Sampler intervals can now be configured via env vars. !50625
- Add test to check if /users/User is redirected to /User. !50651 (Takuya Noguchi)
- Add metrics to creating, closing, reopening and merging merge requests. !50654
- Update Docker from 19.03.0 to 20.10.1 on CI/CD. !50732 (Takuya Noguchi)
- Migrate jwks_controller specs to request specs of them. !50767 (Takuya Noguchi @tnir)
- Update copy on Feature Flags List view to be more descriptive for users. !50813 (Sarah Rosenshine)
- Add metrics to creating, editing or removing comments on merge requests. !50849
- Use git packages from buster on build-qa-image. !50867 (Takuya Noguchi @tnir)
- Upgrade factory_bot_rails to 6.1.0. !50875
- Update net-ldap gem version. !50888
- Add version cache field to composer metadata. !50906
- Drop temporary index on ci_builds. !50961
- Remove unnecessary use of .freeze. !50963 (Adam Davies @adamd92)
- Update canary(next) badge style with new GitLab UI. !50965 (Yogi (@yo))
- Remove tmp_index_for_email_unconfirmation_migration index in the emails table. !50981
- Improve delete snippet feature spec. !51020 (Lee Tickett @leetickett)
- Update toggle button in repo general settings. !51036 (Yogi (@yo))
- Reduce heading font size in validate CI lint page. !51042 (Yogi (@yo))
- Remove unnecessary use of .freeze. !51073 (Adam Davies @adamd92)
- Update button style of expand/collapse button on Deploy Tokens page. !51077 (nuwe1)
- Update button style of Revoke button on Deploy Tokens page. !51079 (nuwe1)
- Apply GitLab UI button styles to buttons in transactions show.html.haml files. !51096 (nuwe1)
- Add metrics to creating, editing or removing multiline comments on merge requests. !51098
- Update default value of applications_settings.max_import_size to 0. !51229
- Add one welcome email for account provisioned by group. !51271
- Add `gl-button` to move issue button in issue sidebar. !51285 (Yogi (@yo))
- Update to new GitLab UI button in members invite page. !51300 (Yogi (@yo))
- Update grape-path-helpers gem version. !51320
- Drop tmp_index_for_email_unconfirmation index from the emails table again. !51440
- Add metrics to starting and publishing a review. !51521
- Add gl-badge to members list badges. !51546 (Yogi (@yo))
- Add gl-badge to CI badges. !51547 (Yogi (@yo))
- Add gl-badge to CI runners. !51548 (Yogi (@yo))
- Add gl-mt-3 to no schedules nothing-here-block. !51551 (Yogi (@yo))
- Add gl-button to Add Jaeger URL. !51553 (Yogi (@yo))
- Add gl-button to dismiss feature highlight button. !51555 (Yogi (@yo))
- Remove unneeded group label index. !51676
- Apply GitLab UI button styles to buttons in project wiki. !51780 (Yogi (@yo))
- Add verbiage + link sast to show it's in core. !51935
## 13.7.4 (2021-01-13)
@ -549,6 +916,26 @@ entry.
- Update GitLab Workhorse to v8.57.0.
## 13.6.5 (2021-01-13)
### Security (1 change)
- Deny implicit flow for confidential apps.
## 13.6.4 (2021-01-07)
### Security (7 changes)
- Forbid public cache for private repos.
- Deny implicit flow for confidential apps.
- Update NuGet regular expression to protect against ReDoS.
- Fix regular expression backtracking issue in package name validation.
- Upgrade GitLab Pages to 1.30.2.
- Update trusted OAuth applications to set them as confidential.
- Upgrade Workhorse to 8.54.2.
## 13.6.3 (2020-12-10)
### Fixed (5 changes)
@ -1107,6 +1494,26 @@ entry.
- Change wording on the project remove fork page. !47878
## 13.5.7 (2021-01-13)
### Security (1 change)
- Deny implicit flow for confidential apps.
## 13.5.6 (2021-01-07)
### Security (7 changes)
- Forbid public cache for private repos.
- Deny implicit flow for confidential apps.
- Update NuGet regular expression to protect against ReDoS.
- Fix regular expression backtracking issue in package name validation.
- Upgrade GitLab Pages to 1.28.2.
- Update trusted OAuth applications to set them as confidential.
- Upgrade Workhorse to 8.51.2.
## 13.5.5 (2020-12-07)
### Security (10 changes)

View File

@ -1 +1 @@
13.7.8
13.8.5

View File

@ -1 +1 @@
13.7.0
13.8.0

View File

@ -1 +1 @@
13.14.1
13.15.1

View File

@ -1 +1 @@
8.58.4
8.59.2

53
Gemfile
View File

@ -4,9 +4,6 @@ gem 'rails', '~> 6.0.3.1'
gem 'bootsnap', '~> 1.4.6'
# Improves copy-on-write performance for MRI
gem 'nakayoshi_fork', '~> 0.0.4'
# Responders respond_to and respond_with
gem 'responders', '~> 3.0'
@ -19,10 +16,10 @@ gem 'default_value_for', '~> 3.3.0'
gem 'pg', '~> 1.1'
gem 'rugged', '~> 0.28'
gem 'grape-path-helpers', '~> 1.5'
gem 'grape-path-helpers', '~> 1.6.1'
gem 'faraday', '~> 1.0'
gem 'marginalia', '~> 1.9.0'
gem 'marginalia', '~> 1.10.0'
# Authentication libraries
gem 'devise', '~> 4.7.2'
@ -57,7 +54,7 @@ gem 'gssapi', group: :kerberos
# Spam and anti-bot protection
gem 'recaptcha', '~> 4.11', require: 'recaptcha/rails'
gem 'akismet', '~> 3.0'
gem 'invisible_captcha', '~> 0.12.1'
gem 'invisible_captcha', '~> 1.1.0'
# Two-factor authentication
gem 'devise-two-factor', '~> 3.1.0'
@ -81,12 +78,10 @@ gem 'gpgme', '~> 2.0.19'
# GitLab fork with several improvements to original library. For full list of changes
# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
gem 'gitlab_omniauth-ldap', '~> 2.1.1', require: 'omniauth-ldap'
gem 'net-ldap'
gem 'net-ldap', '~> 0.16.3'
# API
# Locked at Grape v1.4.0 until https://github.com/ruby-grape/grape/pull/2088 is merged
# Remove config/initializers/grape_patch.rb
gem 'grape', '= 1.4.0'
gem 'grape', '~> 1.5.1'
gem 'grape-entity', '~> 0.7.1'
gem 'rack-cors', '~> 1.0.6', require: 'rack/cors'
@ -115,7 +110,7 @@ gem 'carrierwave', '~> 1.3'
gem 'mini_magick', '~> 4.10.1'
# for backups
gem 'fog-aws', '~> 3.7'
gem 'fog-aws', '~> 3.8'
# Locked until fog-google resolves https://github.com/fog/fog-google/issues/421.
# Also see config/initializers/fog_core_patch.rb.
gem 'fog-core', '= 2.1.0'
@ -145,7 +140,7 @@ gem 'aws-sdk-s3', '~> 1'
gem 'faraday_middleware-aws-sigv4', '~>0.3.0'
# Markdown and HTML processing
gem 'html-pipeline', '~> 2.12'
gem 'html-pipeline', '~> 2.13.2'
gem 'deckar01-task_list', '2.3.1'
gem 'gitlab-markup', '~> 1.7.1'
gem 'github-markup', '~> 1.7.0', require: 'github/markup'
@ -163,7 +158,7 @@ gem 'asciidoctor-kroki', '~> 0.2.2', require: false
gem 'rouge', '~> 3.26.0'
gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0'
gem 'nokogiri', '~> 1.10.9'
gem 'nokogiri', '~> 1.11.1'
gem 'escape_utils', '~> 1.1'
# Calendar rendering
@ -184,15 +179,15 @@ group :unicorn do
end
group :puma do
gem 'gitlab-puma', '~> 4.3.3.gitlab.2', require: false
gem 'gitlab-puma_worker_killer', '~> 0.1.1.gitlab.1', require: false
gem 'puma', '~> 5.1.1', require: false
gem 'puma_worker_killer', '~> 0.3.1', require: false
end
# State machine
gem 'state_machines-activerecord', '~> 0.6.0'
gem 'state_machines-activerecord', '~> 0.8.0'
# Issue tags
gem 'acts-as-taggable-on', '~> 6.0'
gem 'acts-as-taggable-on', '~> 7.0'
# Background jobs
gem 'sidekiq', '~> 5.2.7'
@ -242,7 +237,7 @@ gem 'discordrb-webhooks-blackst0ne', '~> 3.3', require: false
gem 'hipchat', '~> 1.5.0'
# Jira integration
gem 'jira-ruby', '~> 2.0.0'
gem 'jira-ruby', '~> 2.1.4'
gem 'atlassian-jwt', '~> 0.2.0'
# Flowdock integration
@ -255,7 +250,7 @@ gem 'slack-messenger', '~> 2.3.4'
gem 'hangouts-chat', '~> 0.0.5'
# Asana integration
gem 'asana', '0.10.2'
gem 'asana', '~> 0.10.3'
# FogBugz integration
gem 'ruby-fogbugz', '~> 0.2.1'
@ -306,12 +301,12 @@ gem 'rack-attack', '~> 6.3.0'
gem 'sentry-raven', '~> 3.0'
# PostgreSQL query parsing
gem 'gitlab-pg_query', '~> 1.3', require: 'pg_query'
gem 'pg_query', '~> 1.3.0'
gem 'premailer-rails', '~> 1.10.3'
# LabKit: Tracing and Correlation
gem 'gitlab-labkit', '0.13.3'
gem 'gitlab-labkit', '0.14.0'
# Thrift is a dependency of gitlab-labkit, we want a version higher than 0.14.0
# because of https://gitlab.com/gitlab-org/gitlab/-/issues/321900
gem 'thrift', '>= 0.14.0'
@ -334,6 +329,7 @@ gem 'snowplow-tracker', '~> 0.6.1'
# Metrics
group :metrics do
gem 'method_source', '~> 1.0', require: false
gem 'webrick', '~> 1.6.1', require: false
# Prometheus
gem 'prometheus-client-mmap', '~> 0.12.0'
@ -356,14 +352,15 @@ end
group :development, :test do
gem 'deprecation_toolkit', '~> 1.5.1', require: false
gem 'bullet', '~> 6.1.0'
gem 'pry-byebug', '~> 3.9.0', platform: :mri
gem 'gitlab-pry-byebug', platform: :mri, require: ['pry-byebug', 'pry-byebug/pry_remote_ext']
gem 'pry-rails', '~> 0.3.9'
gem 'pry-remote'
gem 'awesome_print', require: false
gem 'database_cleaner', '~> 1.7.0'
gem 'factory_bot_rails', '~> 5.1.0'
gem 'rspec-rails', '~> 4.0.0'
gem 'factory_bot_rails', '~> 6.1.0'
gem 'rspec-rails', '~> 4.0.1'
# Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826)
gem 'minitest', '~> 5.11.0'
@ -374,7 +371,7 @@ group :development, :test do
gem 'spring', '~> 2.1.0'
gem 'spring-commands-rspec', '~> 1.0.4'
gem 'gitlab-styles', '~> 5.3.0', require: false
gem 'gitlab-styles', '~> 6.0.0', require: false
gem 'scss_lint', '~> 0.59.0', require: false
gem 'haml_lint', '~> 0.36.0', require: false
@ -412,7 +409,7 @@ group :test do
gem 'rspec_profiling', '~> 0.0.6'
gem 'rspec-parameterized', require: false
gem 'capybara', '~> 3.33.0'
gem 'capybara', '~> 3.34.0'
gem 'capybara-screenshot', '~> 1.0.22'
gem 'selenium-webdriver', '~> 3.142'
@ -468,7 +465,7 @@ group :ed25519 do
end
# Gitaly GRPC protocol definitions
gem 'gitaly', '~> 13.7.0.pre.rc1'
gem 'gitaly', '~> 13.8.0.pre.rc2'
gem 'grpc', '~> 1.30.2'
@ -481,7 +478,7 @@ gem 'flipper', '~> 0.17.1'
gem 'flipper-active_record', '~> 0.17.1'
gem 'flipper-active_support_cache_store', '~> 0.17.1'
gem 'unleash', '~> 0.1.5'
gem 'gitlab-experiment', '~> 0.4.4'
gem 'gitlab-experiment', '~> 0.4.5'
# Structured logging
gem 'lograge', '~> 0.5'

View File

@ -5,66 +5,66 @@ GEM
abstract_type (0.0.7)
acme-client (2.0.6)
faraday (>= 0.17, < 2.0.0)
actioncable (6.0.3.3)
actionpack (= 6.0.3.3)
actioncable (6.0.3.4)
actionpack (= 6.0.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.3)
actionpack (= 6.0.3.3)
activejob (= 6.0.3.3)
activerecord (= 6.0.3.3)
activestorage (= 6.0.3.3)
activesupport (= 6.0.3.3)
actionmailbox (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
mail (>= 2.7.1)
actionmailer (6.0.3.3)
actionpack (= 6.0.3.3)
actionview (= 6.0.3.3)
activejob (= 6.0.3.3)
actionmailer (6.0.3.4)
actionpack (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.3)
actionview (= 6.0.3.3)
activesupport (= 6.0.3.3)
actionpack (6.0.3.4)
actionview (= 6.0.3.4)
activesupport (= 6.0.3.4)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.3)
actionpack (= 6.0.3.3)
activerecord (= 6.0.3.3)
activestorage (= 6.0.3.3)
activesupport (= 6.0.3.3)
actiontext (6.0.3.4)
actionpack (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
nokogiri (>= 1.8.5)
actionview (6.0.3.3)
activesupport (= 6.0.3.3)
actionview (6.0.3.4)
activesupport (= 6.0.3.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.3.3)
activesupport (= 6.0.3.3)
activejob (6.0.3.4)
activesupport (= 6.0.3.4)
globalid (>= 0.3.6)
activemodel (6.0.3.3)
activesupport (= 6.0.3.3)
activerecord (6.0.3.3)
activemodel (= 6.0.3.3)
activesupport (= 6.0.3.3)
activemodel (6.0.3.4)
activesupport (= 6.0.3.4)
activerecord (6.0.3.4)
activemodel (= 6.0.3.4)
activesupport (= 6.0.3.4)
activerecord-explain-analyze (0.1.0)
activerecord (>= 4)
pg
activestorage (6.0.3.3)
actionpack (= 6.0.3.3)
activejob (= 6.0.3.3)
activerecord (= 6.0.3.3)
activestorage (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
marcel (~> 0.3.1)
activesupport (6.0.3.3)
activesupport (6.0.3.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
acts-as-taggable-on (6.5.0)
activerecord (>= 5.0, < 6.1)
acts-as-taggable-on (7.0.0)
activerecord (>= 5.0, < 6.2)
adamantium (0.2.0)
ice_nine (~> 0.11.0)
memoizable (~> 0.4.0)
@ -76,7 +76,7 @@ GEM
apollo_upload_server (2.0.2)
graphql (>= 1.8)
rails (>= 4.2)
asana (0.10.2)
asana (0.10.3)
faraday (~> 1.0)
faraday_middleware (~> 1.0)
faraday_middleware-multi_json (~> 0.0)
@ -115,13 +115,14 @@ GEM
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
azure-storage-blob (2.0.0)
azure-storage-blob (2.0.1)
azure-storage-common (~> 2.0)
nokogiri (~> 1.10.4)
azure-storage-common (2.0.1)
nokogiri (~> 1.11.0.rc2)
azure-storage-common (2.0.2)
faraday (~> 1.0)
faraday_middleware (~> 1.0.0.rc1)
nokogiri (~> 1.10.4)
net-http-persistent (~> 4.0)
nokogiri (~> 1.11.0.rc2)
babosa (1.0.2)
base32 (0.3.2)
batch-loader (1.4.0)
@ -151,7 +152,7 @@ GEM
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
byebug (11.1.3)
capybara (3.33.0)
capybara (3.34.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@ -228,17 +229,16 @@ GEM
activerecord (>= 3.2.0, < 6.1)
deprecation_toolkit (1.5.1)
activesupport (>= 4.2)
derailed_benchmarks (1.7.0)
derailed_benchmarks (1.8.1)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (~> 0)
mini_histogram (~> 0)
mini_histogram (>= 0.2.1)
rack (>= 1)
rake (> 10, < 14)
ruby-statistics (>= 2.1)
thor (>= 0.19, < 2)
unicode_plot (>= 0.0.4, < 1.0.0)
device_detector (1.0.0)
devise (4.7.3)
bcrypt (~> 3.0)
@ -252,7 +252,7 @@ GEM
devise (~> 4.0)
railties (< 6.1)
rotp (~> 2.0)
diff-lcs (1.3)
diff-lcs (1.4.4)
diff_match_patch (0.1.0)
diffy (3.3.0)
discordrb-webhooks-blackst0ne (3.3.0)
@ -265,21 +265,19 @@ GEM
doorkeeper-openid_connect (1.7.4)
doorkeeper (>= 5.2, < 5.5)
json-jwt (>= 1.11.0)
dry-configurable (0.11.5)
dry-configurable (0.12.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.4, >= 0.4.7)
dry-equalizer (~> 0.2)
dry-core (~> 0.5, >= 0.5.0)
dry-container (0.7.2)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.4.9)
dry-core (0.5.0)
concurrent-ruby (~> 1.0)
dry-equalizer (0.3.0)
dry-inflector (0.2.0)
dry-logic (1.0.6)
dry-logic (1.1.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
dry-core (~> 0.5, >= 0.5)
dry-types (1.4.0)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
@ -309,7 +307,6 @@ GEM
launchy (~> 2.1)
mail (~> 2.7)
encryptor (3.0.0)
enumerable-statistics (2.0.1)
equalizer (0.0.11)
erubi (1.9.0)
escape_utils (1.2.1)
@ -321,11 +318,11 @@ GEM
expression_parser (0.9.0)
extended-markdown-filter (0.6.0)
html-pipeline (~> 2.0)
factory_bot (5.1.0)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.0)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.1.0)
factory_bot (~> 6.1.0)
railties (>= 5.0.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.7)
@ -363,7 +360,7 @@ GEM
fog-json
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-aws (3.7.0)
fog-aws (3.8.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-xml (~> 0.1)
@ -420,12 +417,12 @@ GEM
rails (>= 3.2.0)
git (1.7.0)
rchardet (~> 1.8)
gitaly (13.7.0.pre.rc1)
gitaly (13.8.0.pre.rc2)
grpc (~> 1.0)
github-markup (1.7.0)
gitlab-chronic (0.10.5)
numerizer (~> 0.2)
gitlab-experiment (0.4.4)
gitlab-experiment (0.4.5)
activesupport (>= 3.0)
scientist (~> 1.5, >= 1.5.0)
gitlab-fog-azure-rm (1.0.0)
@ -435,9 +432,9 @@ GEM
fog-json (~> 1.2.0)
mime-types
ms_rest_azure (~> 0.12.0)
gitlab-labkit (0.13.3)
actionpack (>= 5.0.0, < 6.1.0)
activesupport (>= 5.0.0, < 6.1.0)
gitlab-labkit (0.14.0)
actionpack (>= 5.0.0, < 7.0.0)
activesupport (>= 5.0.0, < 7.0.0)
gitlab-pg_query (~> 1.3)
grpc (~> 1.19)
jaeger-client (~> 1.1)
@ -447,19 +444,17 @@ GEM
gitlab-mail_room (0.0.8)
gitlab-markup (1.7.1)
gitlab-net-dns (0.9.1)
gitlab-pg_query (1.3.0)
gitlab-puma (4.3.5.gitlab.3)
nio4r (~> 2.0)
gitlab-puma_worker_killer (0.1.1.gitlab.1)
get_process_mem (~> 0.2)
gitlab-puma (>= 2.7, < 5)
gitlab-pg_query (1.3.1)
gitlab-pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
gitlab-sidekiq-fetcher (0.5.2)
sidekiq (~> 5)
gitlab-styles (5.3.0)
rubocop (~> 0.89.1)
rubocop-gitlab-security (~> 0.1.0)
rubocop-performance (~> 1.8.1)
rubocop-rails (~> 2.8)
gitlab-styles (6.0.0)
rubocop (~> 0.91.1)
rubocop-gitlab-security (~> 0.1.1)
rubocop-performance (~> 1.9.2)
rubocop-rails (~> 2.9)
rubocop-rspec (~> 1.44)
gitlab_chronic_duration (0.10.6.2)
numerizer (~> 0.2)
@ -497,7 +492,7 @@ GEM
signet (~> 0.14)
gpgme (2.0.20)
mini_portile2 (~> 2.3)
grape (1.4.0)
grape (1.5.1)
activesupport
builder
dry-types (>= 1.1)
@ -507,10 +502,11 @@ GEM
grape-entity (0.7.1)
activesupport (>= 4.0)
multi_json (>= 1.3.2)
grape-path-helpers (1.5.0)
grape-path-helpers (1.6.1)
activesupport
grape (~> 1.3)
rake (> 12)
ruby2_keywords (~> 0.0.2)
grape_logging (1.8.3)
grape
rack
@ -573,11 +569,12 @@ GEM
hashie (>= 3.0)
health_check (3.0.0)
railties (>= 5.0)
heapy (0.1.4)
heapy (0.2.0)
thor
hipchat (1.5.2)
httparty
mimemagic
html-pipeline (2.12.2)
html-pipeline (2.13.2)
activesupport (>= 2)
nokogiri (>= 1.4)
html2text (0.2.0)
@ -598,18 +595,18 @@ GEM
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
i18n (1.8.5)
i18n (1.8.7)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
icalendar (2.4.1)
ice_nine (0.11.2)
invisible_captcha (0.12.1)
rails (>= 3.2.0)
invisible_captcha (1.1.0)
rails (>= 4.2)
ipaddress (0.8.3)
jaeger-client (1.1.0)
opentracing (~> 0.3)
thrift
jira-ruby (2.0.0)
jira-ruby (2.1.4)
activesupport
atlassian-jwt
multipart-post
@ -686,7 +683,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.7.0)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lru_redux (1.1.0)
@ -695,7 +692,7 @@ GEM
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
marginalia (1.9.0)
marginalia (1.10.0)
actionpack (>= 2.3)
activerecord (>= 2.3)
memoist (0.16.2)
@ -707,10 +704,10 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mimemagic (0.3.5)
mini_histogram (0.1.3)
mini_histogram (0.3.1)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_portile2 (2.5.0)
minitest (5.11.3)
ms_rest (0.7.6)
concurrent-ruby (~> 1.0)
@ -730,17 +727,19 @@ GEM
ruby2_keywords (~> 0.0.1)
mustermann-grape (1.0.1)
mustermann (>= 1.0.0)
nakayoshi_fork (0.0.4)
nap (1.1.0)
nenv (0.3.0)
net-ldap (0.16.2)
net-http-persistent (4.0.0)
connection_pool (~> 2.2)
net-ldap (0.16.3)
net-ntp (2.1.3)
net-ssh (6.0.0)
netrc (0.11.0)
nio4r (2.5.4)
no_proxy_fix (0.1.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
notiffany (0.1.3)
@ -840,13 +839,14 @@ GEM
rubypants (~> 0.2)
orm_adapter (0.5.0)
os (1.1.1)
parallel (1.19.2)
parser (2.7.2.0)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
parslet (1.8.2)
peek (1.1.0)
railties (>= 4.0.0)
pg (1.2.3)
pg_query (1.3.0)
png_quantizator (0.2.1)
po_to_json (1.0.1)
json (>= 1.6.0)
@ -866,14 +866,20 @@ GEM
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
pry-remote (0.1.8)
pry (~> 0.9)
slop (~> 3.0)
public_suffix (4.0.6)
puma (5.1.1)
nio4r (~> 2.0)
puma_worker_killer (0.3.1)
get_process_mem (~> 0.2)
puma (>= 2.7)
pyu-ruby-sasl (0.0.3.3)
raabro (1.1.6)
racc (1.5.2)
rack (2.2.3)
rack-accept (0.4.5)
rack (>= 0.4)
@ -894,20 +900,20 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-timeout (0.5.2)
rails (6.0.3.3)
actioncable (= 6.0.3.3)
actionmailbox (= 6.0.3.3)
actionmailer (= 6.0.3.3)
actionpack (= 6.0.3.3)
actiontext (= 6.0.3.3)
actionview (= 6.0.3.3)
activejob (= 6.0.3.3)
activemodel (= 6.0.3.3)
activerecord (= 6.0.3.3)
activestorage (= 6.0.3.3)
activesupport (= 6.0.3.3)
rails (6.0.3.4)
actioncable (= 6.0.3.4)
actionmailbox (= 6.0.3.4)
actionmailer (= 6.0.3.4)
actionpack (= 6.0.3.4)
actiontext (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
activemodel (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
bundler (>= 1.3.0)
railties (= 6.0.3.3)
railties (= 6.0.3.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@ -921,15 +927,15 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.0.3.3)
actionpack (= 6.0.3.3)
activesupport (= 6.0.3.3)
railties (6.0.3.4)
actionpack (= 6.0.3.4)
activesupport (= 6.0.3.4)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
raindrops (0.19.1)
rake (13.0.1)
rake (13.0.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
@ -989,25 +995,25 @@ GEM
chunky_png
rqrcode-rails3 (0.1.7)
rqrcode (>= 0.4.2)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (~> 3.10.0)
rspec-parameterized (0.4.2)
binding_ninja (>= 0.2.3)
parser
proc_to_ast
rspec (>= 2.13, < 4)
unparser
rspec-rails (4.0.0)
rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
@ -1017,7 +1023,7 @@ GEM
rspec-support (~> 3.9)
rspec-retry (0.6.1)
rspec-core (> 3.3)
rspec-support (3.9.2)
rspec-support (3.10.0)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rspec_profiling (0.0.6)
@ -1025,26 +1031,26 @@ GEM
pg
rails
sqlite3
rubocop (0.89.1)
rubocop (0.91.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.3.0, < 1.0)
rubocop-ast (>= 0.4.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.8.0)
parser (>= 2.7.1.5)
rubocop-gitlab-security (0.1.1)
rubocop (>= 0.51)
rubocop-performance (1.8.1)
rubocop (>= 0.87.0)
rubocop-performance (1.9.2)
rubocop (>= 0.90.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.8.1)
rubocop-rails (2.9.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.87.0)
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (1.44.1)
rubocop (~> 0.87)
rubocop-ast (>= 0.7.1)
@ -1053,7 +1059,7 @@ GEM
ruby-fogbugz (0.2.1)
crack (~> 0.4)
ruby-prof (1.3.1)
ruby-progressbar (1.10.1)
ruby-progressbar (1.11.0)
ruby-saml (1.7.2)
nokogiri (>= 1.5.10)
ruby-statistics (2.1.2)
@ -1127,6 +1133,7 @@ GEM
simplecov-html (0.12.2)
sixarm_ruby_unaccent (1.2.0)
slack-messenger (2.3.4)
slop (3.6.0)
snowplow-tracker (0.6.1)
contracts (~> 0.7, <= 0.11)
spring (2.1.1)
@ -1143,12 +1150,12 @@ GEM
sshkey (2.0.0)
stackprof (0.2.15)
state_machines (0.5.0)
state_machines-activemodel (0.7.1)
activemodel (>= 4.1)
state_machines-activemodel (0.8.0)
activemodel (>= 5.1)
state_machines (>= 0.5.0)
state_machines-activerecord (0.6.0)
activerecord (>= 4.1)
state_machines-activemodel (>= 0.5.0)
state_machines-activerecord (0.8.0)
activerecord (>= 5.1)
state_machines-activemodel (>= 0.8.0)
swd (1.1.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
@ -1185,7 +1192,7 @@ GEM
truncato (0.7.11)
htmlentities (~> 4.3.1)
nokogiri (>= 1.7.0, <= 2.0)
tzinfo (1.2.8)
tzinfo (1.2.9)
thread_safe (~> 0.1)
u2f (0.2.1)
uber (0.1.0)
@ -1193,8 +1200,6 @@ GEM
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
unicode_plot (0.0.4)
enumerable-statistics (>= 2.0.1)
unicode_utils (1.4.0)
unicorn (5.5.5)
kgio (~> 2.6)
@ -1247,6 +1252,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.6.1)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
@ -1259,7 +1265,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yajl-ruby (1.4.1)
zeitwerk (2.4.1)
zeitwerk (2.4.2)
PLATFORMS
ruby
@ -1268,11 +1274,11 @@ DEPENDENCIES
RedCloth (~> 4.3.2)
acme-client (~> 2.0, >= 2.0.6)
activerecord-explain-analyze (~> 0.1)
acts-as-taggable-on (~> 6.0)
acts-as-taggable-on (~> 7.0)
addressable (~> 2.7)
akismet (~> 3.0)
apollo_upload_server (~> 2.0.2)
asana (= 0.10.2)
asana (~> 0.10.3)
asciidoctor (~> 2.0.10)
asciidoctor-include-ext (~> 0.3.1)
asciidoctor-kroki (~> 0.2.2)
@ -1297,7 +1303,7 @@ DEPENDENCIES
browser (~> 4.2)
bullet (~> 6.1.0)
bundler-audit (~> 0.6.1)
capybara (~> 3.33.0)
capybara (~> 3.34.0)
capybara-screenshot (~> 1.0.22)
carrierwave (~> 1.3)
charlock_holmes (~> 0.7.7)
@ -1329,7 +1335,7 @@ DEPENDENCIES
email_spec (~> 2.2.0)
erubi (~> 1.9.0)
escape_utils (~> 1.1)
factory_bot_rails (~> 5.1.0)
factory_bot_rails (~> 6.1.0)
faraday (~> 1.0)
faraday_middleware-aws-sigv4 (~> 0.3.0)
fast_blank
@ -1339,7 +1345,7 @@ DEPENDENCIES
flipper-active_support_cache_store (~> 0.17.1)
flowdock (~> 0.7)
fog-aliyun (~> 0.3)
fog-aws (~> 3.7)
fog-aws (~> 3.8)
fog-core (= 2.1.0)
fog-google (~> 1.12)
fog-local (~> 0.6)
@ -1351,30 +1357,28 @@ DEPENDENCIES
gettext (~> 3.3)
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3)
gitaly (~> 13.7.0.pre.rc1)
gitaly (~> 13.8.0.pre.rc2)
github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5)
gitlab-experiment (~> 0.4.4)
gitlab-experiment (~> 0.4.5)
gitlab-fog-azure-rm (~> 1.0)
gitlab-labkit (= 0.13.3)
gitlab-labkit (= 0.14.0)
gitlab-license (~> 1.0)
gitlab-mail_room (~> 0.0.8)
gitlab-markup (~> 1.7.1)
gitlab-net-dns (~> 0.9.1)
gitlab-pg_query (~> 1.3)
gitlab-puma (~> 4.3.3.gitlab.2)
gitlab-puma_worker_killer (~> 0.1.1.gitlab.1)
gitlab-pry-byebug
gitlab-sidekiq-fetcher (= 0.5.2)
gitlab-styles (~> 5.3.0)
gitlab-styles (~> 6.0.0)
gitlab_chronic_duration (~> 0.10.6.2)
gitlab_omniauth-ldap (~> 2.1.1)
gon (~> 6.2)
google-api-client (~> 0.33)
google-protobuf (~> 3.12)
gpgme (~> 2.0.19)
grape (= 1.4.0)
grape (~> 1.5.1)
grape-entity (~> 0.7.1)
grape-path-helpers (~> 1.5)
grape-path-helpers (~> 1.6.1)
grape_logging (~> 1.7)
graphiql-rails (~> 1.4.10)
graphlient (~> 0.4.0)
@ -1390,13 +1394,13 @@ DEPENDENCIES
hashie-forbidden_attributes
health_check (~> 3.0)
hipchat (~> 1.5.0)
html-pipeline (~> 2.12)
html-pipeline (~> 2.13.2)
html2text
httparty (~> 0.16.4)
icalendar
invisible_captcha (~> 0.12.1)
invisible_captcha (~> 1.1.0)
ipaddress (~> 0.8.3)
jira-ruby (~> 2.0.0)
jira-ruby (~> 2.1.4)
js_regex (~> 3.4)
json (~> 2.3.0)
json-schema (~> 2.8.0)
@ -1414,18 +1418,17 @@ DEPENDENCIES
loofah (~> 2.2)
lru_redux
mail (= 2.7.1)
marginalia (~> 1.9.0)
marginalia (~> 1.10.0)
memory_profiler (~> 0.9)
method_source (~> 1.0)
mimemagic (~> 0.3.2)
mini_magick (~> 4.10.1)
minitest (~> 5.11.0)
multi_json (~> 1.14.1)
nakayoshi_fork (~> 0.0.4)
net-ldap
net-ldap (~> 0.16.3)
net-ntp
net-ssh (~> 6.0)
nokogiri (~> 1.10.9)
nokogiri (~> 1.11.1)
oauth2 (~> 1.4)
octokit (~> 4.15)
oj (~> 3.10.6)
@ -1451,11 +1454,14 @@ DEPENDENCIES
parallel (~> 1.19)
peek (~> 1.1)
pg (~> 1.1)
pg_query (~> 1.3.0)
png_quantizator (~> 0.2.1)
premailer-rails (~> 1.10.3)
prometheus-client-mmap (~> 0.12.0)
pry-byebug (~> 3.9.0)
pry-rails (~> 0.3.9)
pry-remote
puma (~> 5.1.1)
puma_worker_killer (~> 0.3.1)
rack (~> 2.2.3)
rack-attack (~> 6.3.0)
rack-cors (~> 1.0.6)
@ -1481,7 +1487,7 @@ DEPENDENCIES
rouge (~> 3.26.0)
rqrcode-rails3 (~> 0.1.7)
rspec-parameterized
rspec-rails (~> 4.0.0)
rspec-rails (~> 4.0.1)
rspec-retry (~> 0.6.1)
rspec_junit_formatter
rspec_profiling (~> 0.0.6)
@ -1511,7 +1517,7 @@ DEPENDENCIES
sprockets (~> 3.7.0)
sshkey (~> 2.0)
stackprof (~> 0.2.15)
state_machines-activerecord (~> 0.6.0)
state_machines-activerecord (~> 0.8.0)
sys-filesystem (~> 1.1.6)
terser (= 1.0.2)
test-prof (~> 0.12.0)
@ -1531,6 +1537,7 @@ DEPENDENCIES
vmstat (~> 2.3.0)
webauthn (~> 2.3)
webmock (~> 3.9.1)
webrick (~> 1.6.1)
wikicloth (= 0.8.1)
yajl-ruby (~> 1.4.1)

View File

@ -6,7 +6,7 @@ require "guard/rspec/dsl"
cmd = ENV['GUARD_CMD'] || (ENV['SPRING'] ? 'spring rspec' : 'bundle exec rspec')
directories %w(app ee lib spec)
directories %w(app ee lib rubocop tooling spec)
rspec_context_for = proc do |context_path|
OpenStruct.new(to_s: "spec").tap do |rspec|
@ -42,6 +42,8 @@ guard_setup = proc do |context_path|
# Ruby files
watch(%r{^#{context_path}(lib/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
watch(%r{^#{context_path}(rubocop/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
watch(%r{^#{context_path}(tooling/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
# Rails files
rails = rails_context_for.call(context_path, %w(erb haml slim))

View File

@ -1 +1 @@
13.7.8
13.8.5

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,7 +1,7 @@
import Vue from 'vue';
import ExpiresAtField from './components/expires_at_field.vue';
const getInputAttrs = el => {
const getInputAttrs = (el) => {
const input = el.querySelector('input');
return {

View File

@ -9,9 +9,9 @@ export default class Activities {
constructor(container = '') {
this.container = container;
Pager.init(20, true, false, data => data, this.updateTooltips, this.container);
Pager.init(20, true, false, (data) => data, this.updateTooltips, this.container);
$('.event-filter-link').on('click', e => {
$('.event-filter-link').on('click', (e) => {
e.preventDefault();
this.toggleFilter(e.currentTarget);
this.reloadActivities();
@ -24,7 +24,7 @@ export default class Activities {
reloadActivities() {
$('.content_list').html('');
Pager.init(20, true, false, data => data, this.updateTooltips, this.container);
Pager.init(20, true, false, (data) => data, this.updateTooltips, this.container);
}
toggleFilter(sender) {

View File

@ -61,14 +61,14 @@ export default {
},
},
selectedCommitsCount() {
return this.selectedCommits.filter(selectedCommit => selectedCommit.isSelected).length;
return this.selectedCommits.filter((selectedCommit) => selectedCommit.isSelected).length;
},
shouldPurge() {
return this.selectedCommitsCount !== this.selectedCommits.length;
},
uniqueCommits() {
return this.selectedCommits.filter(
selectedCommit =>
(selectedCommit) =>
selectedCommit.isSelected &&
findCommitIndex(this.contextCommits, selectedCommit.short_id) === -1,
);
@ -126,7 +126,7 @@ export default {
this.focusSearch();
if (this.shouldPurge) {
this.setSelectedCommits(
[...this.commits, ...this.selectedCommits].filter(commit => commit.isSelected),
[...this.commits, ...this.selectedCommits].filter((commit) => commit.isSelected),
);
}
}
@ -178,7 +178,7 @@ export default {
this.setCommits({ commits: tempCommits });
this.setSelectedCommits([
...tempSelectedCommits,
...tempCommits.filter(commit => commit.isSelected),
...tempCommits.filter((commit) => commit.isSelected),
]);
},
handleCreateContextCommits() {
@ -186,7 +186,7 @@ export default {
return Promise.all([
this.createContextCommits({ commits: this.uniqueCommits }),
this.removeContextCommits(),
]).then(values => {
]).then((values) => {
if (values[0] || values[1]) {
window.location.reload();
}

View File

@ -27,10 +27,10 @@ export const searchCommits = ({ dispatch, commit, state }, searchText) => {
return axios
.get(state.contextCommitsPath, params)
.then(({ data }) => {
let commits = data.map(o => ({ ...o, isSelected: false }));
commits = commits.map(c => {
let commits = data.map((o) => ({ ...o, isSelected: false }));
commits = commits.map((c) => {
const isPresent = state.selectedCommits.find(
selectedCommit => selectedCommit.short_id === c.short_id && selectedCommit.isSelected,
(selectedCommit) => selectedCommit.short_id === c.short_id && selectedCommit.isSelected,
);
if (isPresent) {
return { ...c, isSelected: true };
@ -50,7 +50,7 @@ export const searchCommits = ({ dispatch, commit, state }, searchText) => {
export const setCommits = ({ commit }, { commits: data, silentAddition = false }) => {
let commits = _.uniqBy(data, 'short_id');
commits = _.orderBy(data, c => new Date(c.committed_date), ['desc']);
commits = _.orderBy(data, (c) => new Date(c.committed_date), ['desc']);
if (silentAddition) {
commit(types.SET_COMMITS_SILENT, commits);
} else {
@ -60,7 +60,7 @@ export const setCommits = ({ commit }, { commits: data, silentAddition = false }
export const createContextCommits = ({ state }, { commits, forceReload = false }) =>
Api.createContextCommits(state.projectId, state.mergeRequestIid, {
commits: commits.map(commit => commit.short_id),
commits: commits.map((commit) => commit.short_id),
})
.then(() => {
if (forceReload) {
@ -81,7 +81,7 @@ export const fetchContextCommits = ({ dispatch, commit, state }) => {
commit(types.FETCH_CONTEXT_COMMITS);
return Api.allContextCommits(state.projectId, state.mergeRequestIid)
.then(({ data }) => {
const contextCommits = data.map(o => ({ ...o, isSelected: true }));
const contextCommits = data.map((o) => ({ ...o, isSelected: true }));
dispatch('setContextCommits', contextCommits);
dispatch('setCommits', {
commits: [...state.commits, ...contextCommits],
@ -121,7 +121,7 @@ export const setSelectedCommits = ({ commit }, selected) => {
let selectedCommits = _.uniqBy(selected, 'short_id');
selectedCommits = _.orderBy(
selectedCommits,
selectedCommit => new Date(selectedCommit.committed_date),
(selectedCommit) => new Date(selectedCommit.committed_date),
['desc'],
);
commit(types.SET_SELECTED_COMMITS, selectedCommits);

View File

@ -1,5 +1,5 @@
export const findCommitIndex = (commits, commitShortId) => {
return commits.findIndex(commit => commit.short_id === commitShortId);
return commits.findIndex((commit) => commit.short_id === commitShortId);
};
export const setCommitStatus = (commits, commitIndex, selected) => {

View File

@ -1,7 +1,7 @@
import PayloadPreviewer from '~/pages/admin/application_settings/payload_previewer';
export default () => {
Array.from(document.querySelectorAll('.js-payload-preview-trigger')).forEach(trigger => {
Array.from(document.querySelectorAll('.js-payload-preview-trigger')).forEach((trigger) => {
new PayloadPreviewer(trigger).init();
});
};

View File

@ -36,7 +36,7 @@ export default {
)
"
>
<template #docLink="{content}">
<template #docLink="{ content }">
<gl-link :href="docsLink" target="_blank">{{ content }}</gl-link>
</template>
<template #strong="{ content }"

View File

@ -35,7 +35,7 @@ export default {
)
"
>
<template #docLink="{content}">
<template #docLink="{ content }">
<gl-link :href="docsLink" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>

View File

@ -2,7 +2,7 @@ import Vue from 'vue';
import StatisticsPanelApp from './components/app.vue';
import createStore from './store';
export default function(el) {
export default function (el) {
if (!el) {
return false;
}

View File

@ -13,7 +13,7 @@ export const fetchStatistics = ({ dispatch }) => {
.then(({ data }) => {
dispatch('receiveStatisticsSuccess', convertObjectPropsToCamelCase(data, { deep: true }));
})
.catch(error => dispatch('receiveStatisticsError', error));
.catch((error) => dispatch('receiveStatisticsError', error));
};
export const receiveStatisticsSuccess = ({ commit }, statistics) =>

View File

@ -3,8 +3,8 @@
* and returns an array of the following form:
* [{ key: "forks", label: "Forks", value: 50 }]
*/
export const getStatistics = state => labels =>
Object.keys(labels).map(key => {
export const getStatistics = (state) => (labels) =>
Object.keys(labels).map((key) => {
const result = {
key,
label: labels[key],

View File

@ -0,0 +1,53 @@
<script>
import { GlAvatarLink, GlAvatarLabeled, GlBadge } from '@gitlab/ui';
import { USER_AVATAR_SIZE } from '../constants';
export default {
components: {
GlAvatarLink,
GlAvatarLabeled,
GlBadge,
},
props: {
user: {
type: Object,
required: true,
},
adminUserPath: {
type: String,
required: true,
},
},
computed: {
adminUserHref() {
return this.adminUserPath.replace('id', this.user.username);
},
},
USER_AVATAR_SIZE,
};
</script>
<template>
<gl-avatar-link
v-if="user"
class="js-user-link"
:href="adminUserHref"
:data-user-id="user.id"
:data-username="user.username"
>
<gl-avatar-labeled
:size="$options.USER_AVATAR_SIZE"
:src="user.avatarUrl"
:label="user.name"
:sub-label="user.email"
>
<template #meta>
<div v-for="(badge, idx) in user.badges" :key="idx" class="gl-p-1">
<gl-badge class="gl-display-flex!" size="sm" :variant="badge.variant">{{
badge.text
}}</gl-badge>
</div>
</template>
</gl-avatar-labeled>
</gl-avatar-link>
</template>

View File

@ -1,14 +1,16 @@
<script>
import { GlTable } from '@gitlab/ui';
import { __ } from '~/locale';
import UserAvatar from './user_avatar.vue';
const DEFAULT_TH_CLASSES =
'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!';
const thWidthClass = width => `gl-w-${width}p ${DEFAULT_TH_CLASSES}`;
const thWidthClass = (width) => `gl-w-${width}p ${DEFAULT_TH_CLASSES}`;
export default {
components: {
GlTable,
UserAvatar,
},
props: {
users: {
@ -58,6 +60,10 @@ export default {
:empty-text="s__('AdminUsers|No users found')"
show-empty
stacked="md"
/>
>
<template #cell(name)="{ item: user }">
<UserAvatar :user="user" :admin-user-path="paths.adminUser" />
</template>
</gl-table>
</div>
</template>

View File

@ -0,0 +1 @@
export const USER_AVATAR_SIZE = 32;

View File

@ -2,7 +2,7 @@ import Vue from 'vue';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import AdminUsersApp from './components/app.vue';
export default function(el = document.querySelector('#js-admin-users-app')) {
export default function (el = document.querySelector('#js-admin-users-app')) {
if (!el) {
return false;
}
@ -11,7 +11,7 @@ export default function(el = document.querySelector('#js-admin-users-app')) {
return new Vue({
el,
render: createElement =>
render: (createElement) =>
createElement(AdminUsersApp, {
props: {
users: convertObjectPropsToCamelCase(JSON.parse(users), { deep: true }),

View File

@ -8,9 +8,9 @@ export default function initAlertHandler() {
const DISMISS_LABEL = '[aria-label="Dismiss"]';
const DISMISS_CLASS = '.gl-alert-dismiss';
DISMISSIBLE_SELECTORS.forEach(selector => {
DISMISSIBLE_SELECTORS.forEach((selector) => {
const elements = document.querySelectorAll(selector);
elements.forEach(element => {
elements.forEach((element) => {
const button = element.querySelector(DISMISS_LABEL) || element.querySelector(DISMISS_CLASS);
if (!button) {
return;

View File

@ -140,7 +140,7 @@ export default {
},
currentTabIndex: {
get() {
return this.$options.tabsConfig.findIndex(tab => tab.id === this.activeTab);
return this.$options.tabsConfig.findIndex((tab) => tab.id === this.activeTab);
},
set(tabIdx) {
const tabId = this.$options.tabsConfig[tabIdx].id;
@ -194,15 +194,21 @@ export default {
projectPath: this.projectPath,
},
})
.then(({ data: { createAlertIssue: { errors, issue } } }) => {
if (errors?.length) {
[this.createIncidentError] = errors;
this.incidentCreationInProgress = false;
} else if (issue) {
visitUrl(this.incidentPath(issue.iid));
}
})
.catch(error => {
.then(
({
data: {
createAlertIssue: { errors, issue },
},
}) => {
if (errors?.length) {
[this.createIncidentError] = errors;
this.incidentCreationInProgress = false;
} else if (issue) {
visitUrl(this.incidentPath(issue.iid));
}
},
)
.catch((error) => {
this.createIncidentError = error;
this.incidentCreationInProgress = false;
});

View File

@ -6,20 +6,11 @@ import alertsHelpUrlQuery from '../graphql/queries/alert_help_url.query.graphql'
export default {
i18n: {
emptyState: {
opsgenie: {
title: s__('AlertManagement|Opsgenie is enabled'),
info: s__(
'AlertManagement|You have enabled the Opsgenie integration. Your alerts will be visible directly in Opsgenie.',
),
buttonText: s__('AlertManagement|View alerts in Opsgenie'),
},
gitlab: {
title: s__('AlertManagement|Surface alerts in GitLab'),
info: s__(
'AlertManagement|Display alerts from all your monitoring tools directly within GitLab. Streamline the investigation of your alerts and the escalation of alerts to incidents.',
),
buttonText: s__('AlertManagement|Authorize external service'),
},
title: s__('AlertManagement|Surface alerts in GitLab'),
info: s__(
'AlertManagement|Display alerts from all your monitoring tools directly within GitLab. Streamline the investigation of your alerts and the escalation of alerts to incidents.',
),
buttonText: s__('AlertManagement|Authorize external service'),
},
moreInformation: s__('AlertManagement|More information'),
},
@ -33,46 +24,27 @@ export default {
query: alertsHelpUrlQuery,
},
},
inject: [
'enableAlertManagementPath',
'userCanEnableAlertManagement',
'emptyAlertSvgPath',
'opsgenieMvcEnabled',
'opsgenieMvcTargetUrl',
],
inject: ['enableAlertManagementPath', 'userCanEnableAlertManagement', 'emptyAlertSvgPath'],
data() {
return {
alertsHelpUrl: '',
};
},
computed: {
emptyState() {
return {
...(this.opsgenieMvcEnabled
? this.$options.i18n.emptyState.opsgenie
: this.$options.i18n.emptyState.gitlab),
link: this.opsgenieMvcEnabled ? this.opsgenieMvcTargetUrl : this.enableAlertManagementPath,
};
},
alertsCanBeEnabled() {
return this.userCanEnableAlertManagement || this.opsgenieMvcEnabled;
},
},
};
</script>
<template>
<div>
<gl-empty-state :title="emptyState.title" :svg-path="emptyAlertSvgPath">
<gl-empty-state :title="$options.i18n.emptyState.title" :svg-path="emptyAlertSvgPath">
<template #description>
<div class="gl-display-block">
<span>{{ emptyState.info }}</span>
<gl-link v-if="!opsgenieMvcEnabled" :href="alertsHelpUrl" target="_blank">
<span>{{ $options.i18n.emptyState.info }}</span>
<gl-link :href="alertsHelpUrl" target="_blank">
{{ $options.i18n.moreInformation }}
</gl-link>
</div>
<div v-if="alertsCanBeEnabled" class="gl-display-block center gl-pt-4">
<gl-button category="primary" variant="success" :href="emptyState.link">
{{ emptyState.buttonText }}
<div v-if="userCanEnableAlertManagement" class="gl-display-block center gl-pt-4">
<gl-button category="primary" variant="success" :href="enableAlertManagementPath">
{{ $options.i18n.emptyState.buttonText }}
</gl-button>
</div>
</template>

View File

@ -23,7 +23,7 @@ import {
} from '~/vue_shared/components/paginated_table_with_search_and_tabs/constants';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { convertToSnakeCase } from '~/lib/utils/text_utility';
import getAlerts from '../graphql/queries/get_alerts.query.graphql';
import getAlertsQuery from '~/graphql_shared/queries/get_alerts.query.graphql';
import getAlertsCountByStatus from '../graphql/queries/get_count_by_status.query.graphql';
import {
ALERTS_STATUS_TABS,
@ -119,7 +119,7 @@ export default {
apollo: {
alerts: {
fetchPolicy: fetchPolicies.CACHE_AND_NETWORK,
query: getAlerts,
query: getAlertsQuery,
variables() {
return {
searchTerm: this.searchTerm,
@ -138,7 +138,7 @@ export default {
data.project || {};
const now = new Date();
const listWithData = list.map(alert => {
const listWithData = list.map((alert) => {
const then = new Date(alert.startedAt);
const diff = now - then;

View File

@ -33,7 +33,7 @@ export default {
});
this.metricEmbedComponent = MetricEmbed;
})
.catch(e => Sentry.captureException(e));
.catch((e) => Sentry.captureException(e));
}
},
};

View File

@ -3,7 +3,7 @@ import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
import { trackAlertStatusUpdateOptions } from '../constants';
import updateAlertStatusMutation from '../graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
export default {
i18n: {
@ -57,7 +57,7 @@ export default {
projectPath: this.projectPath,
},
})
.then(resp => {
.then((resp) => {
this.trackStatusUpdate(status);
const errors = resp.data?.updateAlertStatus?.errors || [];

View File

@ -92,7 +92,7 @@ export default {
},
sortedUsers() {
return this.users
.map(user => ({ ...user, active: this.isActive(user.username) }))
.map((user) => ({ ...user, active: this.isActive(user.username) }))
.sort((a, b) => (a.active === b.active ? 0 : a.active ? -1 : 1)); // eslint-disable-line no-nested-ternary
},
dropdownClass() {
@ -192,7 +192,7 @@ export default {
</script>
<template>
<div class="block alert-assignees ">
<div class="block alert-assignees">
<div ref="assignees" class="sidebar-collapsed-icon" @click="$emit('toggle-sidebar')">
<gl-icon name="user" :size="14" />
<gl-loading-icon v-if="isUpdating" />

View File

@ -115,7 +115,7 @@ export default {
variables: this.getAlertQueryVariables,
});
const data = produce(sourceData, draftData => {
const data = produce(sourceData, (draftData) => {
// eslint-disable-next-line no-param-reassign
draftData.project.alertManagementAlerts.nodes[0].todos.nodes = [];
});

View File

@ -9,7 +9,7 @@ import createRouter from './router';
Vue.use(VueApollo);
export default selector => {
export default (selector) => {
const domEl = document.querySelector(selector);
const { alertId, projectPath, projectIssuesPath, projectId } = domEl.dataset;
const router = createRouter();
@ -18,7 +18,7 @@ export default selector => {
Mutation: {
toggleSidebarStatus: (_, __, { cache }) => {
const sourceData = cache.readQuery({ query: sidebarStatusQuery });
const data = produce(sourceData, draftData => {
const data = produce(sourceData, (draftData) => {
// eslint-disable-next-line no-param-reassign
draftData.sidebarStatus = !draftData.sidebarStatus;
});
@ -30,7 +30,7 @@ export default selector => {
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(resolvers, {
cacheConfig: {
dataIdFromObject: object => {
dataIdFromObject: (object) => {
// eslint-disable-next-line no-underscore-dangle
if (object.__typename === 'AlertManagementAlert') {
return object.iid;
@ -51,6 +51,9 @@ export default selector => {
// eslint-disable-next-line no-new
new Vue({
el: selector,
components: {
AlertDetails,
},
provide: {
projectPath,
alertId,
@ -58,9 +61,6 @@ export default selector => {
projectId,
},
apolloProvider,
components: {
AlertDetails,
},
router,
render(createElement) {
return createElement('alert-details', {});

View File

@ -1,5 +1,5 @@
#import "./list_item.fragment.graphql"
#import "./alert_note.fragment.graphql"
#import "~/graphql_shared/fragments/alert.fragment.graphql"
#import "~/graphql_shared/fragments/alert_note.fragment.graphql"
fragment AlertDetailItem on AlertManagementAlert {
...AlertListItem

View File

@ -1,4 +1,4 @@
#import "../fragments/alert_note.fragment.graphql"
#import "~/graphql_shared/fragments/alert_note.fragment.graphql"
mutation alertSetAssignees($projectPath: ID!, $assigneeUsernames: [String!]!, $iid: String!) {
alertSetAssignees(

View File

@ -17,12 +17,10 @@ export default () => {
emptyAlertSvgPath,
populatingAlertsHelpUrl,
alertsHelpUrl,
opsgenieMvcTargetUrl,
textQuery,
assigneeUsernameQuery,
alertManagementEnabled,
userCanEnableAlertManagement,
opsgenieMvcEnabled,
} = domEl.dataset;
const apolloProvider = new VueApollo({
@ -30,7 +28,7 @@ export default () => {
{},
{
cacheConfig: {
dataIdFromObject: object => {
dataIdFromObject: (object) => {
// eslint-disable-next-line no-underscore-dangle
if (object.__typename === 'AlertManagementAlert') {
return object.iid;
@ -50,6 +48,9 @@ export default () => {
return new Vue({
el: selector,
components: {
AlertManagementList,
},
provide: {
projectPath,
textQuery,
@ -57,15 +58,10 @@ export default () => {
enableAlertManagementPath,
populatingAlertsHelpUrl,
emptyAlertSvgPath,
opsgenieMvcTargetUrl,
alertManagementEnabled: parseBoolean(alertManagementEnabled),
userCanEnableAlertManagement: parseBoolean(userCanEnableAlertManagement),
opsgenieMvcEnabled: parseBoolean(opsgenieMvcEnabled),
},
apolloProvider,
components: {
AlertManagementList,
},
render(createElement) {
return createElement('alert-management-list');
},

View File

@ -91,25 +91,11 @@ export default {
];
},
},
watch: {
activated() {
this.updateIcon();
},
},
methods: {
updateIcon() {
return document.querySelectorAll('.js-service-active-status').forEach(icon => {
if (icon.dataset.value === this.activated.toString()) {
icon.classList.remove('d-none');
} else {
icon.classList.add('d-none');
}
});
},
resetKey() {
return axios
.put(this.formPath, { service: { token: '' } })
.then(res => {
.then((res) => {
this.authorizationKey = res.data.token;
})
.catch(() => {

View File

@ -2,7 +2,7 @@ import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import AlertsServiceForm from './components/alerts_service_form.vue';
export default el => {
export default (el) => {
if (!el) {
return null;
}

View File

@ -40,6 +40,11 @@ export default {
directives: {
GlTooltip,
},
inject: {
gitlabAlertFields: {
default: gitlabFieldsMock,
},
},
props: {
payloadFields: {
type: Array,
@ -57,16 +62,11 @@ export default {
gitlabFields: this.gitlabAlertFields,
};
},
inject: {
gitlabAlertFields: {
default: gitlabFieldsMock,
},
},
computed: {
mappingData() {
return this.gitlabFields.map(gitlabField => {
return this.gitlabFields.map((gitlabField) => {
const mappingFields = this.payloadFields.filter(({ type }) =>
type.some(t => gitlabField.compatibleTypes.includes(t)),
type.some((t) => gitlabField.compatibleTypes.includes(t)),
);
const foundMapping = this.mapping.find(
@ -88,26 +88,26 @@ export default {
},
methods: {
setMapping(gitlabKey, mappingKey, valueKey) {
const fieldIndex = this.gitlabFields.findIndex(field => field.name === gitlabKey);
const fieldIndex = this.gitlabFields.findIndex((field) => field.name === gitlabKey);
const updatedField = { ...this.gitlabFields[fieldIndex], ...{ [valueKey]: mappingKey } };
Vue.set(this.gitlabFields, fieldIndex, updatedField);
},
setSearchTerm(search = '', searchFieldKey, gitlabKey) {
const fieldIndex = this.gitlabFields.findIndex(field => field.name === gitlabKey);
const fieldIndex = this.gitlabFields.findIndex((field) => field.name === gitlabKey);
const updatedField = { ...this.gitlabFields[fieldIndex], ...{ [searchFieldKey]: search } };
Vue.set(this.gitlabFields, fieldIndex, updatedField);
},
filterFields(searchTerm = '', fields) {
const search = searchTerm.toLowerCase();
return fields.filter(field => field.label.toLowerCase().includes(search));
return fields.filter((field) => field.label.toLowerCase().includes(search));
},
isSelected(fieldValue, mapping) {
return fieldValue === mapping;
},
selectedValue(name) {
return (
this.payloadFields.find(item => item.name === name)?.label ||
this.payloadFields.find((item) => item.name === name)?.label ||
this.$options.i18n.makeSelection
);
},

View File

@ -97,8 +97,8 @@ export default {
};
},
mounted() {
const callback = entries => {
const isVisible = entries.some(entry => entry.isIntersecting);
const callback = (entries) => {
const isVisible = entries.some((entry) => entry.isIntersecting);
if (isVisible) {
this.trackPageViews();

View File

@ -18,14 +18,11 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import MappingBuilder from './alert_mapping_builder.vue';
import AlertSettingsFormHelpBlock from './alert_settings_form_help_block.vue';
import getCurrentIntegrationQuery from '../graphql/queries/get_current_integration.query.graphql';
import service from '../services';
import {
integrationTypesNew,
integrationTypes,
JSON_VALIDATE_DELAY,
targetPrometheusUrlPlaceholder,
targetOpsgenieUrlPlaceholder,
typeSet,
sectionHash,
} from '../constants';
// Mocks will be removed when integrating with BE is ready
// data format is defined and will be the same as mocked (maybe with some minor changes)
@ -91,20 +88,13 @@ export const i18n = {
'AlertSettings|Resetting the authorization key for this project will require updating the authorization key in every alert source it is enabled in.',
),
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
opsgenie: {
label: s__('AlertSettings|2. Add link to your Opsgenie alert list'),
info: s__(
'AlertSettings|Utilizing this option will link the GitLab Alerts navigation item to your existing Opsgenie instance. By selecting this option, you cannot receive alerts from any other source in GitLab; it will effectively be turning Alerts within GitLab off as a feature.',
),
},
},
};
export default {
integrationTypes,
placeholders: {
prometheus: targetPrometheusUrlPlaceholder,
opsgenie: targetOpsgenieUrlPlaceholder,
},
JSON_VALIDATE_DELAY,
typeSet,
@ -127,6 +117,7 @@ export default {
directives: {
GlModal: GlModalDirective,
},
mixins: [glFeatureFlagsMixin()],
inject: {
generic: {
default: {},
@ -134,12 +125,7 @@ export default {
prometheus: {
default: {},
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
opsgenie: {
default: {},
},
},
mixins: [glFeatureFlagsMixin()],
props: {
loading: {
type: Boolean,
@ -149,12 +135,6 @@ export default {
type: Boolean,
required: true,
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
canManageOpsgenie: {
type: Boolean,
required: false,
default: false,
},
},
apollo: {
currentIntegration: {
@ -163,7 +143,7 @@ export default {
},
data() {
return {
selectedIntegration: integrationTypesNew[0].value,
selectedIntegration: integrationTypes[0].value,
active: false,
formVisible: false,
integrationTestPayload: {
@ -174,8 +154,6 @@ export default {
customMapping: null,
parsingPayload: false,
currentIntegration: null,
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
isManagingOpsgenie: false,
};
},
computed: {
@ -185,32 +163,12 @@ export default {
jsonIsValid() {
return this.integrationTestPayload.error === null;
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
disabledIntegrations() {
const options = [];
if (this.opsgenie.active) {
options.push(typeSet.http, typeSet.prometheus);
} else if (!this.canManageOpsgenie) {
options.push(typeSet.opsgenie);
}
return options;
},
options() {
return integrationTypesNew.map(el => ({
...el,
disabled: this.disabledIntegrations.includes(el.value),
}));
},
selectedIntegrationType() {
switch (this.selectedIntegration) {
case typeSet.http:
return this.generic;
case typeSet.prometheus:
return this.prometheus;
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
case typeSet.opsgenie:
return this.opsgenie;
default:
return {};
}
@ -285,49 +243,17 @@ export default {
},
methods: {
integrationTypeSelect() {
if (this.selectedIntegration === integrationTypesNew[0].value) {
if (this.selectedIntegration === integrationTypes[0].value) {
this.formVisible = false;
} else {
this.formVisible = true;
}
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
if (this.canManageOpsgenie && this.selectedIntegration === typeSet.opsgenie) {
this.isManagingOpsgenie = true;
this.active = this.opsgenie.active;
this.integrationForm.apiUrl = this.opsgenie.opsgenieMvcTargetUrl;
} else {
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
this.isManagingOpsgenie = false;
}
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
submitWithOpsgenie() {
return service
.updateGenericActive({
endpoint: this.opsgenie.formPath,
params: {
service: {
opsgenie_mvc_target_url: this.integrationForm.apiUrl,
opsgenie_mvc_enabled: this.active,
},
},
})
.then(() => {
window.location.hash = sectionHash;
window.location.reload();
});
},
submitWithTestPayload() {
this.$emit('set-test-alert-payload', this.testAlertPayload);
this.submit();
},
submit() {
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
if (this.isManagingOpsgenie) {
return this.submitWithOpsgenie();
}
const { name, apiUrl } = this.integrationForm;
const variables =
this.selectedIntegration === typeSet.http
@ -343,7 +269,7 @@ export default {
return this.$emit('create-new-integration', integrationPayload);
},
reset() {
this.selectedIntegration = integrationTypesNew[0].value;
this.selectedIntegration = integrationTypes[0].value;
this.integrationTypeSelect();
if (this.currentIntegration) {
@ -360,9 +286,6 @@ export default {
error: null,
};
this.active = false;
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
this.isManagingOpsgenie = false;
},
resetAuthKey() {
if (!this.currentIntegration) {
@ -390,10 +313,10 @@ export default {
// TODO: replace with real BE mutation when ready;
this.parsingPayload = true;
return new Promise(resolve => {
return new Promise((resolve) => {
setTimeout(() => resolve(mockedCustomMapping), 1000);
})
.then(res => {
.then((res) => {
const mapping = { ...res };
delete mapping.storedMapping;
this.customMapping = res;
@ -408,7 +331,7 @@ export default {
},
getIntegrationMapping() {
// TODO: replace with real BE mutation when ready;
return Promise.resolve(mockedCustomMapping).then(res => {
return Promise.resolve(mockedCustomMapping).then((res) => {
this.customMapping = res;
this.integrationTestPayload.json = res?.samplePayload.body;
});
@ -428,8 +351,8 @@ export default {
<gl-form-select
v-model="selectedIntegration"
:disabled="isSelectDisabled"
:class="{ 'gl-bg-gray-100!': isSelectDisabled }"
:options="options"
class="mw-100"
:options="$options.integrationTypes"
@change="integrationTypeSelect"
/>
@ -441,37 +364,7 @@ export default {
</div>
</gl-form-group>
<gl-collapse v-model="formVisible" class="gl-mt-3">
<!-- TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657 -->
<div v-if="isManagingOpsgenie">
<gl-form-group
id="integration-webhook"
:label="$options.i18n.integrationFormSteps.opsgenie.label"
label-for="integration-webhook"
>
<span class="gl-my-4">
{{ $options.i18n.integrationFormSteps.opsgenie.info }}
</span>
<gl-toggle
v-model="active"
:is-loading="loading"
:label="__('Active')"
class="gl-my-4 gl-font-weight-normal"
/>
<gl-form-input
id="opsgenie-opsgenieMvcTargetUrl"
v-model="integrationForm.apiUrl"
type="text"
:placeholder="$options.placeholders.opsgenie"
/>
<span class="gl-text-gray-400 gl-my-1">
{{ $options.i18n.integrationFormSteps.prometheusFormUrl.help }}
</span>
</gl-form-group>
</div>
<div v-else>
<div>
<gl-form-group
id="name-integration"
:label="$options.i18n.integrationFormSteps.step2.label"
@ -661,9 +554,7 @@ export default {
data-testid="integration-form-submit"
>{{ s__('AlertSettings|Save integration') }}
</gl-button>
<!-- TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657 -->
<gl-button
v-if="!isManagingOpsgenie"
data-testid="integration-test-and-submit"
:disabled="isSubmitTestPayloadDisabled"
category="secondary"
@ -672,12 +563,7 @@ export default {
@click="submitWithTestPayload"
>{{ s__('AlertSettings|Save and test payload') }}</gl-button
>
<gl-button
type="reset"
class="js-no-auto-disable"
:class="{ 'gl-ml-3': isManagingOpsgenie }"
>{{ __('Cancel') }}</gl-button
>
<gl-button type="reset" class="js-no-auto-disable">{{ __('Cancel') }}</gl-button>
</div>
</gl-collapse>
</gl-form>

View File

@ -1,5 +1,4 @@
<script>
import { GlAlert, GlLink, GlSprintf } from '@gitlab/ui';
import { s__ } from '~/locale';
import { fetchPolicies } from '~/lib/graphql';
import createFlash, { FLASH_TYPES } from '~/flash';
@ -41,10 +40,6 @@ export default {
),
},
components: {
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
GlAlert,
GlLink,
GlSprintf,
IntegrationsList,
AlertSettingsForm,
},
@ -55,10 +50,6 @@ export default {
prometheus: {
default: {},
},
// TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657
opsgenie: {
default: {},
},
projectPath: {
default: '',
},
@ -105,13 +96,6 @@ export default {
canAddIntegration() {
return this.multiIntegrations || this.integrations?.list?.length < 2;
},
canManageOpsgenie() {
return (
this.opsgenie.active ||
this.integrations?.list?.every(({ active }) => active === false) ||
this.integrations?.list?.length === 0
);
},
},
methods: {
createNewIntegration({ type, variables }) {
@ -243,7 +227,9 @@ export default {
});
},
editIntegration({ id }) {
const currentIntegration = this.integrations.list.find(integration => integration.id === id);
const currentIntegration = this.integrations.list.find(
(integration) => integration.id === id,
);
this.$apollo.mutate({
mutation: updateCurrentIntergrationMutation,
variables: {
@ -317,27 +303,7 @@ export default {
<template>
<div>
<!-- TODO: Will be removed in 13.7 as part of: https://gitlab.com/gitlab-org/gitlab/-/issues/273657 -->
<gl-alert v-if="opsgenie.active" :dismissible="false" variant="tip">
<gl-sprintf
:message="
s__(
'AlertSettings|We will soon be introducing the ability to create multiple unique HTTP endpoints. When this functionality is live, you will be able to configure an integration with Opsgenie to surface Opsgenie alerts in GitLab. This will replace the current Opsgenie integration which will be deprecated. %{linkStart}More Information%{linkEnd}',
)
"
>
<template #link="{ content }">
<gl-link
class="gl-display-inline-block"
href="https://gitlab.com/gitlab-org/gitlab/-/issues/273657"
target="_blank"
>{{ content }}</gl-link
>
</template>
</gl-sprintf>
</gl-alert>
<integrations-list
v-else
:integrations="integrations.list"
:loading="loading"
@edit-integration="editIntegration"
@ -346,7 +312,6 @@ export default {
<alert-settings-form
:loading="isUpdating"
:can-add-integration="canAddIntegration"
:can-manage-opsgenie="canManageOpsgenie"
@create-new-integration="createNewIntegration"
@update-integration="updateIntegration"
@reset-token="resetToken"

View File

@ -40,22 +40,15 @@ export const i18n = {
integration: s__('AlertSettings|Integration'),
};
// TODO: Delete as part of old form removal in 13.6
export const integrationTypes = [
{ value: '', text: s__('AlertSettings|Select integration type') },
{ value: 'HTTP', text: s__('AlertSettings|HTTP Endpoint') },
{ value: 'PROMETHEUS', text: s__('AlertSettings|External Prometheus') },
{ value: 'OPSGENIE', text: s__('AlertSettings|Opsgenie') },
];
export const integrationTypesNew = [
{ value: '', text: s__('AlertSettings|Select integration type') },
...integrationTypes,
];
export const typeSet = {
http: 'HTTP',
prometheus: 'PROMETHEUS',
opsgenie: 'OPSGENIE',
};
export const integrationToDeleteDefault = { id: null, name: '' };
@ -63,7 +56,6 @@ export const integrationToDeleteDefault = { id: null, name: '' };
export const JSON_VALIDATE_DELAY = 250;
export const targetPrometheusUrlPlaceholder = 'http://prometheus.example.com/';
export const targetOpsgenieUrlPlaceholder = 'https://app.opsgenie.com/alert/list/';
export const sectionHash = 'js-alert-management-settings';

View File

@ -14,7 +14,7 @@ const resolvers = {
{ cache },
) => {
const sourceData = cache.readQuery({ query: getCurrentIntegrationQuery });
const data = produce(sourceData, draftData => {
const data = produce(sourceData, (draftData) => {
if (id === null) {
// eslint-disable-next-line no-param-reassign
draftData.currentIntegration = null;

View File

@ -11,7 +11,7 @@ apolloProvider.clients.defaultClient.cache.writeData({
});
Vue.use(GlToast);
export default el => {
export default (el) => {
if (!el) {
return null;
}
@ -29,16 +29,15 @@ export default el => {
formPath,
authorizationKey,
url,
opsgenieMvcAvailable,
opsgenieMvcFormPath,
opsgenieMvcEnabled,
opsgenieMvcTargetUrl,
projectPath,
multiIntegrations,
} = el.dataset;
return new Vue({
el,
components: {
AlertSettingsWrapper,
},
provide: {
prometheus: {
active: parseBoolean(prometheusActivated),
@ -56,19 +55,10 @@ export default el => {
token: authorizationKey,
url,
},
opsgenie: {
formPath: opsgenieMvcFormPath,
active: parseBoolean(opsgenieMvcEnabled),
opsgenieMvcTargetUrl,
opsgenieMvcIsAvailable: parseBoolean(opsgenieMvcAvailable),
},
projectPath,
multiIntegrations: parseBoolean(multiIntegrations),
},
apolloProvider,
components: {
AlertSettingsWrapper,
},
render(createElement) {
return createElement('alert-settings-wrapper');
},

View File

@ -14,7 +14,7 @@ const deleteIntegrationFromStore = (store, query, { httpIntegrationDestroy }, va
variables,
});
const data = produce(sourceData, draftData => {
const data = produce(sourceData, (draftData) => {
// eslint-disable-next-line no-param-reassign
draftData.project.alertManagementIntegrations.nodes = draftData.project.alertManagementIntegrations.nodes.filter(
({ id }) => id !== integration.id,
@ -45,7 +45,7 @@ const addIntegrationToStore = (
variables,
});
const data = produce(sourceData, draftData => {
const data = produce(sourceData, (draftData) => {
// eslint-disable-next-line no-param-reassign
draftData.project.alertManagementIntegrations.nodes = [
integration,

View File

@ -60,13 +60,13 @@ export default {
return Object.values(this.errors);
},
isLoading() {
return some(this.$apollo.queries, query => query?.loading);
return some(this.$apollo.queries, (query) => query?.loading);
},
allQueriesFailed() {
return every(this.errorMessages, message => message.length);
return every(this.errorMessages, (message) => message.length);
},
hasLoadingErrors() {
return some(this.errorMessages, message => message.length);
return some(this.errorMessages, (message) => message.length);
},
errorMessage() {
// show the generic loading message if all requests fail
@ -179,7 +179,7 @@ export default {
};
},
})
.catch(error => this.handleError({ identifier, error, message: errorMessage }));
.catch((error) => this.handleError({ identifier, error, message: errorMessage }));
},
},
};

View File

@ -11,7 +11,7 @@ import latestGroupsQuery from '../graphql/queries/groups.query.graphql';
import latestProjectsQuery from '../graphql/queries/projects.query.graphql';
import { getAverageByMonth } from '../utils';
const sortByDate = data => sortBy(data, item => new Date(item[0]).getTime());
const sortByDate = (data) => sortBy(data, (item) => new Date(item[0]).getTime());
const averageAndSortData = (data = [], maxDataPoints) => {
const averaged = getAverageByMonth(
@ -148,7 +148,7 @@ export default {
name: this.$options.i18n.xAxisTitle,
type: 'category',
axisLabel: {
formatter: value => {
formatter: (value) => {
return formatDateAsMonth(value);
},
},
@ -189,7 +189,7 @@ export default {
.fetchMore({
variables: { first: this.totalDataPoints, after: pageInfo.endCursor },
updateQuery: (previousResult, { fetchMoreResult }) => {
const results = produce(fetchMoreResult, newData => {
const results = produce(fetchMoreResult, (newData) => {
// eslint-disable-next-line no-param-reassign
newData[dataKey].nodes = [
...previousResult[dataKey].nodes,
@ -199,7 +199,7 @@ export default {
return results;
},
})
.catch(error => {
.catch((error) => {
this.handleError({ error, message: errorMessage, dataKey });
});
}

View File

@ -10,7 +10,7 @@ import { formatDateAsMonth } from '~/lib/utils/datetime_utility';
import usersQuery from '../graphql/queries/users.query.graphql';
import { getAverageByMonth } from '../utils';
const sortByDate = data => sortBy(data, item => new Date(item[0]).getTime());
const sortByDate = (data) => sortBy(data, (item) => new Date(item[0]).getTime());
export default {
name: 'UsersChart',
@ -106,7 +106,7 @@ export default {
.fetchMore({
variables: { first: this.totalDataPoints, after: this.pageInfo.endCursor },
updateQuery: (previousResult, { fetchMoreResult }) => {
return produce(fetchMoreResult, newUsers => {
return produce(fetchMoreResult, (newUsers) => {
// eslint-disable-next-line no-param-reassign
newUsers.users.nodes = [...previousResult.users.nodes, ...newUsers.users.nodes];
});

View File

@ -29,7 +29,7 @@ export function getAverageByMonth(items = [], options = {}) {
return { ...memo, [month]: { sum: count, recordCount: 1 } };
}, {});
return Object.keys(itemsMap).map(month => {
return Object.keys(itemsMap).map((month) => {
const { sum, recordCount } = itemsMap[month];
const avg = sum / recordCount;
if (shouldRound) {

View File

@ -8,18 +8,18 @@ export default () => {
return false;
}
return containers.forEach(container => {
return containers.forEach((container) => {
const { chartData } = container.dataset;
const formattedData = JSON.parse(chartData);
return new Vue({
el: container,
provide: {
formattedData,
},
components: {
ActivityChart,
},
provide: {
formattedData,
},
render(createElement) {
return createElement('activity-chart');
},

View File

@ -5,6 +5,12 @@ import { __ } from '~/locale';
const DEFAULT_PER_PAGE = 20;
/**
* Slow deprecation Notice: Please rather use for new calls
* or during refactors /rest_api as this is doing named exports
* which support treeshaking
*/
const Api = {
DEFAULT_PER_PAGE,
groupsPath: '/api/:version/groups.json',
@ -13,6 +19,7 @@ const Api = {
groupMilestonesPath: '/api/:version/groups/:id/milestones',
subgroupsPath: '/api/:version/groups/:id/subgroups',
namespacesPath: '/api/:version/namespaces.json',
groupInvitationsPath: '/api/:version/groups/:id/invitations',
groupPackagesPath: '/api/:version/groups/:id/packages',
projectPackagesPath: '/api/:version/projects/:id/packages',
projectPackagePath: '/api/:version/projects/:id/packages/:package_id',
@ -23,6 +30,7 @@ const Api = {
projectLabelsPath: '/:namespace_path/:project_path/-/labels',
projectFileSchemaPath: '/:namespace_path/:project_path/-/schema/:ref/:filename',
projectUsersPath: '/api/:version/projects/:id/users',
projectInvitationsPath: '/api/:version/projects/:id/invitations',
projectMembersPath: '/api/:version/projects/:id/members',
projectMergeRequestsPath: '/api/:version/projects/:id/merge_requests',
projectMergeRequestPath: '/api/:version/projects/:id/merge_requests/:mrid',
@ -127,12 +135,18 @@ const Api = {
});
},
inviteGroupMember(id, data) {
addGroupMembersByUserId(id, data) {
const url = Api.buildUrl(this.groupMembersPath).replace(':id', encodeURIComponent(id));
return axios.post(url, data);
},
inviteGroupMembersByEmail(id, data) {
const url = Api.buildUrl(this.groupInvitationsPath).replace(':id', encodeURIComponent(id));
return axios.post(url, data);
},
groupMilestones(id, options) {
const url = Api.buildUrl(this.groupMilestonesPath).replace(':id', encodeURIComponent(id));
@ -144,7 +158,10 @@ const Api = {
});
},
// Return groups list. Filtered by query
/**
* @deprecated This method will be removed soon. Use the
* `getGroups` method in `~/rest_api` instead.
*/
groups(query, options, callback = () => {}) {
const url = Api.buildUrl(Api.groupsPath);
return axios
@ -180,7 +197,10 @@ const Api = {
.then(({ data }) => callback(data));
},
// Return projects list. Filtered by query
/**
* @deprecated This method will be removed soon. Use the
* `getProjects` method in `~/rest_api` instead.
*/
projects(query, options, callback = () => {}) {
const url = Api.buildUrl(Api.projectsPath);
const defaults = {
@ -217,12 +237,18 @@ const Api = {
.then(({ data }) => data);
},
inviteProjectMembers(id, data) {
addProjectMembersByUserId(id, data) {
const url = Api.buildUrl(this.projectMembersPath).replace(':id', encodeURIComponent(id));
return axios.post(url, data);
},
inviteProjectMembersByEmail(id, data) {
const url = Api.buildUrl(this.projectInvitationsPath).replace(':id', encodeURIComponent(id));
return axios.post(url, data);
},
// Return single project
project(projectPath) {
const url = Api.buildUrl(Api.projectPath).replace(':id', encodeURIComponent(projectPath));
@ -374,8 +400,8 @@ const Api = {
.post(url, {
label: data,
})
.then(res => callback(res.data))
.catch(e => callback(e.response.data));
.then((res) => callback(res.data))
.catch((e) => callback(e.response.data));
},
// Return group projects list. Filtered by query
@ -389,10 +415,12 @@ const Api = {
.get(url, {
params: { ...defaults, ...options },
})
.then(({ data }) => callback(data))
.then(({ data }) => (callback ? callback(data) : data))
.catch(() => {
flash(__('Something went wrong while fetching projects'));
callback();
if (callback) {
callback();
}
});
},
@ -414,10 +442,10 @@ const Api = {
});
},
applySuggestion(id) {
applySuggestion(id, message) {
const url = Api.buildUrl(Api.applySuggestionPath).replace(':id', encodeURIComponent(id));
return axios.put(url);
return axios.put(url, { commit_message: message });
},
applySuggestionBatch(ids) {
@ -429,7 +457,7 @@ const Api = {
commitPipelines(projectId, sha) {
const encodedProjectId = projectId
.split('/')
.map(fragment => encodeURIComponent(fragment))
.map((fragment) => encodeURIComponent(fragment))
.join('/');
const url = Api.buildUrl(Api.commitPipelinesPath)
@ -453,7 +481,7 @@ const Api = {
.replace(':type', type)
.replace(':key', encodeURIComponent(key));
return axios.get(url, { params: options }).then(res => {
return axios.get(url, { params: options }).then((res) => {
if (callback) callback(res.data);
return res;
@ -465,7 +493,7 @@ const Api = {
.replace(':id', encodeURIComponent(id))
.replace(':type', type);
return axios.get(url, { params }).then(res => {
return axios.get(url, { params }).then((res) => {
if (callback) callback(res.data);
return res;
@ -505,6 +533,10 @@ const Api = {
.replace(':namespace_path', namespacePath);
},
/**
* @deprecated This method will be removed soon. Use the
* `getUsers` method in `~/rest_api` instead.
*/
users(query, options) {
const url = Api.buildUrl(this.usersPath);
return axios.get(url, {
@ -516,6 +548,10 @@ const Api = {
});
},
/**
* @deprecated This method will be removed soon. Use the
* `getUser` method in `~/rest_api` instead.
*/
user(id, options) {
const url = Api.buildUrl(this.userPath).replace(':id', encodeURIComponent(id));
return axios.get(url, {
@ -523,11 +559,19 @@ const Api = {
});
},
/**
* @deprecated This method will be removed soon. Use the
* `getUserCounts` method in `~/rest_api` instead.
*/
userCounts() {
const url = Api.buildUrl(this.userCountsPath);
return axios.get(url);
},
/**
* @deprecated This method will be removed soon. Use the
* `getUserStatus` method in `~/rest_api` instead.
*/
userStatus(id, options) {
const url = Api.buildUrl(this.userStatusPath).replace(':id', encodeURIComponent(id));
return axios.get(url, {
@ -535,6 +579,10 @@ const Api = {
});
},
/**
* @deprecated This method will be removed soon. Use the
* `getUserProjects` method in `~/rest_api` instead.
*/
userProjects(userId, query, options, callback) {
const url = Api.buildUrl(Api.userProjectsPath).replace(':id', userId);
const defaults = {
@ -570,6 +618,10 @@ const Api = {
});
},
/**
* @deprecated This method will be removed soon. Use the
* `updateUserStatus` method in `~/rest_api` instead.
*/
postUserStatus({ emoji, message, availability }) {
const url = Api.buildUrl(this.userPostStatusPath);
@ -834,11 +886,18 @@ const Api = {
page: 1,
};
const passedOptions = options;
// calling search API with empty string will not return results
if (!passedOptions.search) {
passedOptions.search = undefined;
}
return axios
.get(url, {
params: {
...defaults,
...options,
...passedOptions,
},
})
.then(({ data, headers }) => {

View File

@ -0,0 +1,5 @@
import { joinPaths } from '../lib/utils/url_utility';
export function buildApiUrl(url) {
return joinPaths('/', gon.relative_url_root || '', url.replace(':version', gon.api_version));
}

View File

@ -0,0 +1 @@
export const DEFAULT_PER_PAGE = 20;

View File

@ -0,0 +1,22 @@
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const GROUPS_PATH = '/api/:version/groups.json';
export function getGroups(query, options, callback = () => {}) {
const url = buildApiUrl(GROUPS_PATH);
return axios
.get(url, {
params: {
search: query,
per_page: DEFAULT_PER_PAGE,
...options,
},
})
.then(({ data }) => {
callback(data);
return data;
});
}

View File

@ -0,0 +1,27 @@
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const PROJECTS_PATH = '/api/:version/projects.json';
export function getProjects(query, options, callback = () => {}) {
const url = buildApiUrl(PROJECTS_PATH);
const defaults = {
search: query,
per_page: DEFAULT_PER_PAGE,
simple: true,
};
if (gon.current_user_id) {
defaults.membership = true;
}
return axios
.get(url, {
params: Object.assign(defaults, options),
})
.then(({ data, headers }) => {
callback(data);
return { data, headers };
});
}

View File

@ -0,0 +1,66 @@
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
const USER_COUNTS_PATH = '/api/:version/user_counts';
const USERS_PATH = '/api/:version/users.json';
const USER_PATH = '/api/:version/users/:id';
const USER_STATUS_PATH = '/api/:version/users/:id/status';
const USER_PROJECTS_PATH = '/api/:version/users/:id/projects';
const USER_POST_STATUS_PATH = '/api/:version/user/status';
export function getUsers(query, options) {
const url = buildApiUrl(USERS_PATH);
return axios.get(url, {
params: {
search: query,
per_page: DEFAULT_PER_PAGE,
...options,
},
});
}
export function getUser(id, options) {
const url = buildApiUrl(USER_PATH).replace(':id', encodeURIComponent(id));
return axios.get(url, {
params: options,
});
}
export function getUserCounts() {
const url = buildApiUrl(USER_COUNTS_PATH);
return axios.get(url);
}
export function getUserStatus(id, options) {
const url = buildApiUrl(USER_STATUS_PATH).replace(':id', encodeURIComponent(id));
return axios.get(url, {
params: options,
});
}
export function getUserProjects(userId, query, options, callback) {
const url = buildApiUrl(USER_PROJECTS_PATH).replace(':id', userId);
const defaults = {
search: query,
per_page: DEFAULT_PER_PAGE,
};
return axios
.get(url, {
params: { ...defaults, ...options },
})
.then(({ data }) => callback(data))
.catch(() => flash(__('Something went wrong while fetching projects')));
}
export function updateUserStatus({ emoji, message, availability }) {
const url = buildApiUrl(USER_POST_STATUS_PATH);
return axios.put(url, {
emoji,
message,
availability,
});
}

View File

@ -0,0 +1,5 @@
mutation updateKeepLatestArtifactProjectSetting($fullPath: ID!, $keepLatestArtifact: Boolean!) {
ciCdSettingsUpdate(input: { fullPath: $fullPath, keepLatestArtifact: $keepLatestArtifact }) {
errors
}
}

View File

@ -0,0 +1,7 @@
query getKeepLatestArtifactProjectSetting($fullPath: ID!) {
project(fullPath: $fullPath) {
ciCdSettings {
keepLatestArtifact
}
}
}

View File

@ -0,0 +1,32 @@
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import KeepLatestArtifactCheckbox from '~/artifacts_settings/keep_latest_artifact_checkbox.vue';
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export default (containerId = 'js-artifacts-settings-app') => {
const containerEl = document.getElementById(containerId);
if (!containerEl) {
return false;
}
const { fullPath, helpPagePath } = containerEl.dataset;
return new Vue({
el: containerEl,
apolloProvider,
provide: {
fullPath,
helpPagePath,
},
render(createElement) {
return createElement(KeepLatestArtifactCheckbox);
},
});
};

View File

@ -0,0 +1,99 @@
<script>
import { GlAlert, GlFormCheckbox, GlLink } from '@gitlab/ui';
import { __ } from '~/locale';
import GetKeepLatestArtifactProjectSetting from './graphql/queries/get_keep_latest_artifact_project_setting.query.graphql';
import UpdateKeepLatestArtifactProjectSetting from './graphql/mutations/update_keep_latest_artifact_project_setting.mutation.graphql';
const FETCH_ERROR = __('There was a problem fetching the keep latest artifact setting.');
const UPDATE_ERROR = __('There was a problem updating the keep latest artifact setting.');
export default {
components: {
GlAlert,
GlFormCheckbox,
GlLink,
},
inject: {
fullPath: {
default: '',
},
helpPagePath: {
default: '',
},
},
apollo: {
keepLatestArtifact: {
query: GetKeepLatestArtifactProjectSetting,
variables() {
return {
fullPath: this.fullPath,
};
},
update(data) {
return data.project?.ciCdSettings?.keepLatestArtifact;
},
error() {
this.reportError(FETCH_ERROR);
},
},
},
data() {
return {
keepLatestArtifact: true,
errorMessage: '',
isAlertDismissed: false,
};
},
computed: {
shouldShowAlert() {
return this.errorMessage && !this.isAlertDismissed;
},
},
methods: {
reportError(error) {
this.errorMessage = error;
this.isAlertDismissed = false;
},
async updateSetting(checked) {
try {
const { data } = await this.$apollo.mutate({
mutation: UpdateKeepLatestArtifactProjectSetting,
variables: {
fullPath: this.fullPath,
keepLatestArtifact: checked,
},
});
if (data.ciCdSettingsUpdate.errors.length) {
this.reportError(UPDATE_ERROR);
}
} catch (error) {
this.reportError(UPDATE_ERROR);
}
},
},
};
</script>
<template>
<div>
<gl-alert
v-if="shouldShowAlert"
class="gl-mb-5"
variant="danger"
@dismiss="isAlertDismissed = true"
>{{ errorMessage }}</gl-alert
>
<gl-form-checkbox v-model="keepLatestArtifact" @change="updateSetting"
><b class="gl-mr-3">{{ __('Keep artifacts from most recent successful jobs') }}</b>
<gl-link :href="helpPagePath">{{ __('More information') }}</gl-link></gl-form-checkbox
>
<p>
{{
__(
'The latest artifacts created by jobs in the most recent successful pipeline will be stored.',
)
}}
</p>
</div>
</template>

View File

@ -37,7 +37,7 @@ export default class U2FAuthenticate {
// Note: The server library fixes this behaviour in (unreleased) version 1.0.0.
// This can be removed once we upgrade.
// https://github.com/castle/ruby-u2f/commit/103f428071a81cd3d5f80c2e77d522d5029946a4
this.signRequests = u2fParams.sign_requests.map(request => omit(request, 'challenge'));
this.signRequests = u2fParams.sign_requests.map((request) => omit(request, 'challenge'));
this.templates = {
inProgress: '#js-authenticate-token-2fa-in-progress',
@ -48,7 +48,7 @@ export default class U2FAuthenticate {
start() {
return importU2FLibrary()
.then(utils => {
.then((utils) => {
this.u2fUtils = utils;
this.renderInProgress();
})
@ -60,7 +60,7 @@ export default class U2FAuthenticate {
this.appId,
this.challenge,
this.signRequests,
response => {
(response) => {
if (response.errorCode) {
const error = new U2FError(response.errorCode, 'authenticate');
return this.renderError(error);

View File

@ -34,7 +34,7 @@ export default class U2FRegister {
start() {
return importU2FLibrary()
.then(utils => {
.then((utils) => {
this.u2fUtils = utils;
this.renderSetup();
})
@ -46,7 +46,7 @@ export default class U2FRegister {
this.appId,
this.registerRequests,
this.signRequests,
response => {
(response) => {
if (response.errorCode) {
const error = new U2FError(response.errorCode, 'register');
return this.renderError(error);

View File

@ -39,11 +39,11 @@ export default class WebAuthnAuthenticate {
authenticate() {
navigator.credentials
.get({ publicKey: this.webauthnParams })
.then(resp => {
.then((resp) => {
const convertedResponse = convertGetResponse(resp);
this.renderAuthenticated(JSON.stringify(convertedResponse));
})
.catch(err => {
.catch((err) => {
this.flow.renderError(new WebAuthnError(err, 'authenticate'));
});
}

View File

@ -39,8 +39,8 @@ export default class WebAuthnRegister {
.create({
publicKey: this.webauthnOptions,
})
.then(cred => this.renderRegistered(JSON.stringify(convertCreateResponse(cred))))
.catch(err => this.flow.renderError(new WebAuthnError(err, 'register')));
.then((cred) => this.renderRegistered(JSON.stringify(convertCreateResponse(cred))))
.catch((err) => this.flow.renderError(new WebAuthnError(err, 'register')));
}
renderSetup() {

View File

@ -56,13 +56,13 @@ export class AwardsHandler {
}
},
);
this.registerEventListener('on', $parentEl, 'click', this.toggleButtonSelector, e => {
this.registerEventListener('on', $parentEl, 'click', this.toggleButtonSelector, (e) => {
e.stopPropagation();
e.preventDefault();
this.showEmojiMenu($(e.currentTarget));
});
this.registerEventListener('on', $('html'), 'click', e => {
this.registerEventListener('on', $('html'), 'click', (e) => {
const $target = $(e.target);
if (!$target.closest(`.${this.menuClass}`).length) {
$('.js-awards-block.current').removeClass('current');
@ -74,7 +74,7 @@ export class AwardsHandler {
});
const emojiButtonSelector = `.js-awards-block .js-emoji-btn, .${this.menuClass} .js-emoji-btn`;
this.registerEventListener('on', $parentEl, 'click', emojiButtonSelector, e => {
this.registerEventListener('on', $parentEl, 'click', emojiButtonSelector, (e) => {
e.preventDefault();
const $target = $(e.currentTarget);
const $glEmojiElement = $target.find('gl-emoji');
@ -98,10 +98,7 @@ export class AwardsHandler {
showEmojiMenu($addBtn) {
if ($addBtn.hasClass('js-note-emoji')) {
$addBtn
.closest('.note')
.find('.js-awards-block')
.addClass('current');
$addBtn.closest('.note').find('.js-awards-block').addClass('current');
} else {
$addBtn.closest('.js-awards-block').addClass('current');
}
@ -193,7 +190,7 @@ export class AwardsHandler {
(promiseChain, categoryNameKey) =>
promiseChain.then(
() =>
new Promise(resolve => {
new Promise((resolve) => {
const emojisInCategory = categoryMap[categoryNameKey];
const categoryMarkup = this.renderCategory(
categoryLabelMap[categoryNameKey],
@ -216,7 +213,7 @@ export class AwardsHandler {
menu.dispatchEvent(new CustomEvent('build-emoji-menu-finish'));
}
})
.catch(err => {
.catch((err) => {
emojiContentElement.insertAdjacentHTML(
'beforeend',
'<p>We encountered an error while adding the remaining categories</p>',
@ -233,7 +230,7 @@ export class AwardsHandler {
<ul class="clearfix emoji-menu-list ${opts.menuListClass || ''}">
${emojiList
.map(
emojiName => `
(emojiName) => `
<li class="emoji-menu-list-item">
<button class="emoji-menu-btn text-center js-emoji-btn" type="button">
${this.emoji.glEmojiTag(emojiName, {
@ -466,7 +463,7 @@ export class AwardsHandler {
const className = 'pulse animated once short';
$emoji.addClass(className);
this.registerEventListener('on', $emoji, animationEndEventString, e => {
this.registerEventListener('on', $emoji, animationEndEventString, (e) => {
$(e.currentTarget).removeClass(className);
});
}
@ -518,7 +515,7 @@ export class AwardsHandler {
this.frequentlyUsedEmojis ||
(() => {
const frequentlyUsedEmojis = uniq((Cookies.get('frequently_used_emojis') || '').split(','));
this.frequentlyUsedEmojis = frequentlyUsedEmojis.filter(inputName =>
this.frequentlyUsedEmojis = frequentlyUsedEmojis.filter((inputName) =>
this.emoji.isEmojiNameValid(inputName),
);
@ -530,15 +527,13 @@ export class AwardsHandler {
setupSearch() {
const $search = $('.js-emoji-menu-search');
this.registerEventListener('on', $search, 'input', e => {
const term = $(e.target)
.val()
.trim();
this.registerEventListener('on', $search, 'input', (e) => {
const term = $(e.target).val().trim();
this.searchEmojis(term);
});
const $menu = $(`.${this.menuClass}`);
this.registerEventListener('on', $menu, transitionEndEventString, e => {
this.registerEventListener('on', $menu, transitionEndEventString, (e) => {
if (e.target === e.currentTarget) {
// Clear the search
this.searchEmojis('');
@ -556,17 +551,11 @@ export class AwardsHandler {
// Generate a search result block
const h5 = $('<h5 class="emoji-search-title"/>').text('Search results');
const foundEmojis = this.findMatchingEmojiElements(term).show();
const ul = $('<ul>')
.addClass('emoji-menu-list emoji-menu-search')
.append(foundEmojis);
const ul = $('<ul>').addClass('emoji-menu-list emoji-menu-search').append(foundEmojis);
$('.emoji-menu-content ul, .emoji-menu-content h5').hide();
$('.emoji-menu-content')
.append(h5)
.append(ul);
$('.emoji-menu-content').append(h5).append(ul);
} else {
$('.emoji-menu-content')
.children()
.show();
$('.emoji-menu-content').children().show();
}
}
@ -594,7 +583,7 @@ export class AwardsHandler {
}
hideMenuElement($emojiMenu) {
$emojiMenu.on(transitionEndEventString, e => {
$emojiMenu.on(transitionEndEventString, (e) => {
if (e.currentTarget === e.target) {
// eslint-disable-next-line @gitlab/no-global-event-off
$emojiMenu.removeClass(IS_RENDERED).off(transitionEndEventString);
@ -605,7 +594,7 @@ export class AwardsHandler {
}
destroy() {
this.eventListeners.forEach(entry => {
this.eventListeners.forEach((entry) => {
entry.element.off.call(entry.element, ...entry.args);
});
$(`.${this.menuClass}`).remove();

View File

@ -48,10 +48,10 @@ export default {
},
helpText() {
const placeholders = ['project_path', 'project_id', 'default_branch', 'commit_sha']
.map(placeholder => `<code>%{${placeholder}}</code>`)
.map((placeholder) => `<code>%{${placeholder}}</code>`)
.join(', ');
return sprintf(
s__('Badges|The %{docsLinkStart}variables%{docsLinkEnd} GitLab supports: %{placeholders}'),
s__('Badges|Supported %{docsLinkStart}variables%{docsLinkEnd}: %{placeholders}'),
{
docsLinkEnd: '</a>',
docsLinkStart: `<a href="${escape(this.docsUrl)}">`,
@ -105,13 +105,13 @@ export default {
badgeImageUrlExample() {
const exampleUrl =
'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg';
return sprintf(s__('Badges|e.g. %{exampleUrl}'), {
return sprintf(s__('Badges|Example: %{exampleUrl}'), {
exampleUrl,
});
},
badgeLinkUrlExample() {
const exampleUrl = 'https://example.gitlab.com/%{project_path}';
return sprintf(s__('Badges|e.g. %{exampleUrl}'), {
return sprintf(s__('Badges|Example: %{exampleUrl}'), {
exampleUrl,
});
},
@ -134,10 +134,10 @@ export default {
if (this.isEditing) {
return this.saveBadge()
.then(() => {
createFlash(s__('Badges|The badge was saved.'), 'notice');
createFlash(s__('Badges|Badge saved.'), 'notice');
this.wasValidated = false;
})
.catch(error => {
.catch((error) => {
createFlash(
s__('Badges|Saving the badge failed, please check the entered URLs and try again.'),
);
@ -147,10 +147,10 @@ export default {
return this.addBadge()
.then(() => {
createFlash(s__('Badges|A new badge was added.'), 'notice');
createFlash(s__('Badges|New badge added.'), 'notice');
this.wasValidated = false;
})
.catch(error => {
.catch((error) => {
createFlash(
s__('Badges|Adding the badge failed, please check the entered URLs and try again.'),
);
@ -183,7 +183,7 @@ export default {
required
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<div class="invalid-feedback">{{ s__('Badges|Enter a valid URL') }}</div>
<span class="form-text text-muted">{{ badgeLinkUrlExample }}</span>
</div>
@ -198,7 +198,7 @@ export default {
required
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<div class="invalid-feedback">{{ s__('Badges|Enter a valid URL') }}</div>
<span class="form-text text-muted">{{ badgeImageUrlExample }}</span>
</div>

View File

@ -42,7 +42,7 @@ export default {
.then(() => {
createFlash(s__('Badges|The badge was deleted.'), 'notice');
})
.catch(error => {
.catch((error) => {
createFlash(s__('Badges|Deleting the badge failed, please try again.'));
throw error;
});

View File

@ -2,7 +2,7 @@ import axios from '~/lib/utils/axios_utils';
import types from './mutation_types';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
export const transformBackendBadge = badge => ({
export const transformBackendBadge = (badge) => ({
...convertObjectPropsToCamelCase(badge, true),
isDeleting: false,
});
@ -27,11 +27,11 @@ export default {
image_url: newBadge.imageUrl,
link_url: newBadge.linkUrl,
})
.catch(error => {
.catch((error) => {
dispatch('receiveNewBadgeError');
throw error;
})
.then(res => {
.then((res) => {
dispatch('receiveNewBadge', transformBackendBadge(res.data));
});
},
@ -50,7 +50,7 @@ export default {
const endpoint = `${state.apiEndpointUrl}/${badgeId}`;
return axios
.delete(endpoint)
.catch(error => {
.catch((error) => {
dispatch('receiveDeleteBadgeError', badgeId);
throw error;
})
@ -78,11 +78,11 @@ export default {
const endpoint = state.apiEndpointUrl;
return axios
.get(endpoint)
.catch(error => {
.catch((error) => {
dispatch('receiveLoadBadgesError');
throw error;
})
.then(res => {
.then((res) => {
dispatch('receiveLoadBadges', res.data.map(transformBackendBadge));
});
},
@ -113,11 +113,11 @@ export default {
const renderEndpoint = `${state.apiEndpointUrl}/render?${parameters}`;
return axios
.get(renderEndpoint)
.catch(error => {
.catch((error) => {
dispatch('receiveRenderedBadgeError');
throw error;
})
.then(res => {
.then((res) => {
dispatch('receiveRenderedBadge', transformBackendBadge(res.data));
});
},
@ -142,11 +142,11 @@ export default {
image_url: badge.imageUrl,
link_url: badge.linkUrl,
})
.catch(error => {
.catch((error) => {
dispatch('receiveUpdatedBadgeError');
throw error;
})
.then(res => {
.then((res) => {
dispatch('receiveUpdatedBadge', transformBackendBadge(res.data));
});
},

View File

@ -1,7 +1,7 @@
import types from './mutation_types';
import { PROJECT_BADGE } from '../constants';
const reorderBadges = badges =>
const reorderBadges = (badges) =>
badges.sort((a, b) => {
if (a.kind !== b.kind) {
return a.kind === PROJECT_BADGE ? 1 : -1;
@ -31,7 +31,7 @@ export default {
},
[types.RECEIVE_UPDATED_BADGE](state, updatedBadge) {
const badges = state.badges.map(badge => {
const badges = state.badges.map((badge) => {
if (badge.id === updatedBadge.id) {
return updatedBadge;
}
@ -77,13 +77,13 @@ export default {
},
[types.RECEIVE_DELETE_BADGE](state, badgeId) {
const badges = state.badges.filter(badge => badge.id !== badgeId);
const badges = state.badges.filter((badge) => badge.id !== badgeId);
Object.assign(state, {
badges,
});
},
[types.RECEIVE_DELETE_BADGE_ERROR](state, badgeId) {
const badges = state.badges.map(badge => {
const badges = state.badges.map((badge) => {
if (badge.id === badgeId) {
return {
...badge,
@ -98,7 +98,7 @@ export default {
});
},
[types.REQUEST_DELETE_BADGE](state, badgeId) {
const badges = state.badges.map(badge => {
const badges = state.badges.map((badge) => {
if (badge.id === badgeId) {
return {
...badge,

View File

@ -47,7 +47,7 @@ export default {
}
return sprintf(__("%{authorsName}'s thread"), {
authorsName: this.discussion.notes.find(note => !note.system).author.name,
authorsName: this.discussion.notes.find((note) => !note.system).author.name,
});
},
linePosition() {
@ -98,9 +98,7 @@ export default {
{{ titleText }}
</span>
<template v-if="showLinePosition">
<template v-if="!glFeatures.multilineComments"
>:{{ linePosition }}</template
>
<template v-if="!glFeatures.multilineComments">:{{ linePosition }}</template>
<template v-else-if="startLineNumber === endLineNumber">
:<span :class="getLineClasses(startLineNumber)">{{ startLineNumber }}</span>
</template>

View File

@ -11,8 +11,8 @@ export const saveDraft = ({ dispatch }, draft) =>
export const addDraftToDiscussion = ({ commit }, { endpoint, data }) =>
service
.addDraftToDiscussion(endpoint, data)
.then(res => res.data)
.then(res => {
.then((res) => res.data)
.then((res) => {
commit(types.ADD_NEW_DRAFT, res);
return res;
})
@ -23,8 +23,8 @@ export const addDraftToDiscussion = ({ commit }, { endpoint, data }) =>
export const createNewDraft = ({ commit }, { endpoint, data }) =>
service
.createNewDraft(endpoint, data)
.then(res => res.data)
.then(res => {
.then((res) => res.data)
.then((res) => {
commit(types.ADD_NEW_DRAFT, res);
return res;
})
@ -43,8 +43,8 @@ export const deleteDraft = ({ commit, getters }, draft) =>
export const fetchDrafts = ({ commit, getters }) =>
service
.fetchDrafts(getters.getNotesData.draftsPath)
.then(res => res.data)
.then(data => commit(types.SET_BATCH_COMMENTS_DRAFTS, data))
.then((res) => res.data)
.then((data) => commit(types.SET_BATCH_COMMENTS_DRAFTS, data))
.catch(() => flash(__('An error occurred while fetching pending comments')));
export const publishSingleDraft = ({ commit, dispatch, getters }, draftId) => {
@ -86,8 +86,8 @@ export const updateDraft = (
resolveDiscussion,
position: JSON.stringify(position),
})
.then(res => res.data)
.then(data => commit(types.RECEIVE_DRAFT_UPDATE_SUCCESS, data))
.then((res) => res.data)
.then((data) => commit(types.RECEIVE_DRAFT_UPDATE_SUCCESS, data))
.then(callback)
.catch(() => flash(__('An error occurred while updating the comment')));
@ -116,8 +116,8 @@ export const scrollToDraft = ({ dispatch, rootGetters }, draft) => {
export const expandAllDiscussions = ({ dispatch, state }) =>
state.drafts
.filter(draft => draft.discussion_id)
.forEach(draft => {
.filter((draft) => draft.discussion_id)
.forEach((draft) => {
dispatch('expandDiscussion', { discussionId: draft.discussion_id }, { root: true });
});

View File

@ -1,12 +1,12 @@
import { parallelLineKey, showDraftOnSide } from '../../../utils';
export const draftsCount = state => state.drafts.length;
export const draftsCount = (state) => state.drafts.length;
export const getNotesData = (state, getters, rootState, rootGetters) => rootGetters.getNotesData;
export const hasDrafts = state => state.drafts.length > 0;
export const hasDrafts = (state) => state.drafts.length > 0;
export const draftsPerDiscussionId = state =>
export const draftsPerDiscussionId = (state) =>
state.drafts.reduce((acc, draft) => {
if (draft.discussion_id) {
acc[draft.discussion_id] = draft;
@ -15,7 +15,7 @@ export const draftsPerDiscussionId = state =>
return acc;
}, {});
export const draftsPerFileHashAndLine = state =>
export const draftsPerFileHashAndLine = (state) =>
state.drafts.reduce((acc, draft) => {
if (draft.file_hash) {
if (!acc[draft.file_hash]) {
@ -55,10 +55,10 @@ export const hasParallelDraftRight = (state, getters) => (diffFileSha, line) =>
return draftsForFile ? Boolean(draftsForFile[rkey]) : false;
};
export const shouldRenderDraftRowInDiscussion = (state, getters) => discussionId =>
export const shouldRenderDraftRowInDiscussion = (state, getters) => (discussionId) =>
typeof getters.draftsPerDiscussionId[discussionId] !== 'undefined';
export const draftForDiscussion = (state, getters) => discussionId =>
export const draftForDiscussion = (state, getters) => (discussionId) =>
getters.draftsPerDiscussionId[discussionId] || {};
export const draftForLine = (state, getters) => (diffFileSha, line, side = null) => {
@ -75,10 +75,10 @@ export const draftForLine = (state, getters) => (diffFileSha, line, side = null)
return {};
};
export const draftsForFile = state => diffFileSha =>
state.drafts.filter(draft => draft.file_hash === diffFileSha);
export const draftsForFile = (state) => (diffFileSha) =>
state.drafts.filter((draft) => draft.file_hash === diffFileSha);
export const isPublishingDraft = state => draftId =>
export const isPublishingDraft = (state) => (draftId) =>
state.currentlyPublishingDrafts.indexOf(draftId) !== -1;
export const sortedDrafts = state => [...state.drafts].sort((a, b) => a.id > b.id);
export const sortedDrafts = (state) => [...state.drafts].sort((a, b) => a.id > b.id);

View File

@ -1,6 +1,6 @@
import * as types from './mutation_types';
const processDraft = draft => ({
const processDraft = (draft) => ({
...draft,
isDraft: true,
});
@ -11,7 +11,7 @@ export default {
},
[types.DELETE_DRAFT](state, draftId) {
state.drafts = state.drafts.filter(draft => draft.id !== draftId);
state.drafts = state.drafts.filter((draft) => draft.id !== draftId);
},
[types.SET_BATCH_COMMENTS_DRAFTS](state, drafts) {
@ -23,13 +23,13 @@ export default {
},
[types.RECEIVE_PUBLISH_DRAFT_SUCCESS](state, draftId) {
state.currentlyPublishingDrafts = state.currentlyPublishingDrafts.filter(
publishingDraftId => publishingDraftId !== draftId,
(publishingDraftId) => publishingDraftId !== draftId,
);
state.drafts = state.drafts.filter(d => d.id !== draftId);
state.drafts = state.drafts.filter((d) => d.id !== draftId);
},
[types.RECEIVE_PUBLISH_DRAFT_ERROR](state, draftId) {
state.currentlyPublishingDrafts = state.currentlyPublishingDrafts.filter(
publishingDraftId => publishingDraftId !== draftId,
(publishingDraftId) => publishingDraftId !== draftId,
);
},
@ -44,14 +44,14 @@ export default {
state.isPublishing = false;
},
[types.RECEIVE_DRAFT_UPDATE_SUCCESS](state, data) {
const index = state.drafts.findIndex(draft => draft.id === data.id);
const index = state.drafts.findIndex((draft) => draft.id === data.id);
if (index >= 0) {
state.drafts.splice(index, 1, processDraft(data));
}
},
[types.TOGGLE_RESOLVE_DISCUSSION](state, draftId) {
state.drafts = state.drafts.map(draft => {
state.drafts = state.drafts.map((draft) => {
if (draft.id === draftId) {
return {
...draft,

View File

@ -1,11 +1,11 @@
import { getFormData } from '~/diffs/store/utils';
export const getDraftReplyFormData = data => ({
export const getDraftReplyFormData = (data) => ({
endpoint: data.notesData.draftsPath,
data,
});
export const getDraftFormData = params => ({
export const getDraftFormData = (params) => ({
endpoint: params.notesData.draftsPath,
data: getFormData(params),
});

View File

@ -8,6 +8,6 @@ document.addEventListener('DOMContentLoaded', () => {
Autosize(autosizeEls);
Autosize.update(autosizeEls);
autosizeEls.forEach(el => el.classList.add('js-autosize-initialized'));
autosizeEls.forEach((el) => el.classList.add('js-autosize-initialized'));
});
});

Some files were not shown because too many files have changed in this diff Show More