diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-10 12:07:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-10 12:07:14 +0300 |
commit | 4a6c33b8a49bea08205a77d53d4425b9c23845b4 (patch) | |
tree | f69fdf066c77b8ab4b4e4ca28eb6351d5a786a42 | |
parent | 982bafbdc5dcfdddc90c80817802a05285b5e175 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/toolbar.vue | 2 | ||||
-rw-r--r-- | app/serializers/lfs_file_lock_entity.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/checks/diff_check.rb | 2 | ||||
-rw-r--r-- | spec/graphql/resolvers/ci/config_resolver_spec.rb | 2 | ||||
-rw-r--r-- | spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb | 2 | ||||
-rw-r--r-- | spec/graphql/resolvers/ci/project_pipeline_counts_resolver_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/checks/diff_check_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/ci/artifact_blob_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/ci/build_dependencies_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/ci/build_metadata_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/ci/build_report_result_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/ci/daily_build_group_report_result_spec.rb | 2 | ||||
-rw-r--r-- | spec/serializers/lfs_file_lock_entity_spec.rb | 2 |
13 files changed, 14 insertions, 14 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue b/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue index 1fb290b4ced..50f63c68690 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue @@ -36,7 +36,7 @@ export default { }, computed: { showEditorModeSwitcher() { - return this.showContentEditorSwitcher && !this.previewMarkdown; + return this.showContentEditorSwitcher; }, }, methods: { diff --git a/app/serializers/lfs_file_lock_entity.rb b/app/serializers/lfs_file_lock_entity.rb index 787d201d0a1..dd109cba015 100644 --- a/app/serializers/lfs_file_lock_entity.rb +++ b/app/serializers/lfs_file_lock_entity.rb @@ -8,6 +8,6 @@ class LfsFileLockEntity < Grape::Entity expose(:created_at, as: :locked_at) { |entity| entity.created_at.to_fs(:iso8601) } expose :owner do - expose(:name) { |entity| entity.user&.name } + expose(:name) { |entity| entity.user&.username } end end diff --git a/lib/gitlab/checks/diff_check.rb b/lib/gitlab/checks/diff_check.rb index 1186b532baf..bce4f969284 100644 --- a/lib/gitlab/checks/diff_check.rb +++ b/lib/gitlab/checks/diff_check.rb @@ -74,7 +74,7 @@ module Gitlab lfs_lock = project.lfs_file_locks.where(path: paths).where.not(user_id: user_access.user.id).take if lfs_lock - return "The path '#{lfs_lock.path}' is locked in Git LFS by #{lfs_lock.user.name}" + return "The path '#{lfs_lock.path}' is locked in Git LFS by #{lfs_lock.user.username}" end end end diff --git a/spec/graphql/resolvers/ci/config_resolver_spec.rb b/spec/graphql/resolvers/ci/config_resolver_spec.rb index 692bdf58784..16a2286cb7e 100644 --- a/spec/graphql/resolvers/ci/config_resolver_spec.rb +++ b/spec/graphql/resolvers/ci/config_resolver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Resolvers::Ci::ConfigResolver do +RSpec.describe Resolvers::Ci::ConfigResolver, feature_category: :continuous_integration do include GraphqlHelpers describe '#resolve' do diff --git a/spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb b/spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb index 92f4d3dd8e8..d2bcc7cd597 100644 --- a/spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb +++ b/spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Resolvers::Ci::JobTokenScopeResolver do +RSpec.describe Resolvers::Ci::JobTokenScopeResolver, feature_category: :continuous_integration do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/graphql/resolvers/ci/project_pipeline_counts_resolver_spec.rb b/spec/graphql/resolvers/ci/project_pipeline_counts_resolver_spec.rb index 07b4a5509b2..e04bed0f077 100644 --- a/spec/graphql/resolvers/ci/project_pipeline_counts_resolver_spec.rb +++ b/spec/graphql/resolvers/ci/project_pipeline_counts_resolver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Resolvers::Ci::ProjectPipelineCountsResolver do +RSpec.describe Resolvers::Ci::ProjectPipelineCountsResolver, feature_category: :continuous_integration do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/lib/gitlab/checks/diff_check_spec.rb b/spec/lib/gitlab/checks/diff_check_spec.rb index dd467537a4f..20c6ad8a6e8 100644 --- a/spec/lib/gitlab/checks/diff_check_spec.rb +++ b/spec/lib/gitlab/checks/diff_check_spec.rb @@ -94,7 +94,7 @@ RSpec.describe Gitlab::Checks::DiffCheck, feature_category: :source_code_managem context 'when change is sent by a different user' do it 'raises an error if the user is not allowed to update the file' do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'README' is locked in Git LFS by #{lock.user.name}") + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'README' is locked in Git LFS by #{lock.user.username}") end end @@ -148,7 +148,7 @@ RSpec.describe Gitlab::Checks::DiffCheck, feature_category: :source_code_managem end it "does raise an error" do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'files/locked/baz.lfs' is locked in Git LFS by #{owner.name}") + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'files/locked/baz.lfs' is locked in Git LFS by #{owner.username}") end end end diff --git a/spec/models/ci/artifact_blob_spec.rb b/spec/models/ci/artifact_blob_spec.rb index c00f46683b9..82d43a1deef 100644 --- a/spec/models/ci/artifact_blob_spec.rb +++ b/spec/models/ci/artifact_blob_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::ArtifactBlob do +RSpec.describe Ci::ArtifactBlob, feature_category: :continuous_integration do let_it_be(:project) { create(:project, :public) } let_it_be(:build) { create(:ci_build, :artifacts, project: project) } diff --git a/spec/models/ci/build_dependencies_spec.rb b/spec/models/ci/build_dependencies_spec.rb index 0709aa47ff1..ab32234eba3 100644 --- a/spec/models/ci/build_dependencies_spec.rb +++ b/spec/models/ci/build_dependencies_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::BuildDependencies do +RSpec.describe Ci::BuildDependencies, feature_category: :continuous_integration do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :repository) } diff --git a/spec/models/ci/build_metadata_spec.rb b/spec/models/ci/build_metadata_spec.rb index 8ed0e50e4b0..bd21de1f05a 100644 --- a/spec/models/ci/build_metadata_spec.rb +++ b/spec/models/ci/build_metadata_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::BuildMetadata do +RSpec.describe Ci::BuildMetadata, feature_category: :continuous_integration do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, :repository, group: group, build_timeout: 2000) } diff --git a/spec/models/ci/build_report_result_spec.rb b/spec/models/ci/build_report_result_spec.rb index 90426f60c73..8f6c95053c9 100644 --- a/spec/models/ci/build_report_result_spec.rb +++ b/spec/models/ci/build_report_result_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::BuildReportResult do +RSpec.describe Ci::BuildReportResult, feature_category: :continuous_integration do let_it_be_with_reload(:build_report_result) { create(:ci_build_report_result, :with_junit_success) } it_behaves_like 'cleanup by a loose foreign key' do diff --git a/spec/models/ci/daily_build_group_report_result_spec.rb b/spec/models/ci/daily_build_group_report_result_spec.rb index 6f73d89d760..5de7f5a527f 100644 --- a/spec/models/ci/daily_build_group_report_result_spec.rb +++ b/spec/models/ci/daily_build_group_report_result_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::DailyBuildGroupReportResult do +RSpec.describe Ci::DailyBuildGroupReportResult, feature_category: :continuous_integration do let(:daily_build_group_report_result) { build(:ci_daily_build_group_report_result) } describe 'associations' do diff --git a/spec/serializers/lfs_file_lock_entity_spec.rb b/spec/serializers/lfs_file_lock_entity_spec.rb index 5869941c920..d0ff6fb60af 100644 --- a/spec/serializers/lfs_file_lock_entity_spec.rb +++ b/spec/serializers/lfs_file_lock_entity_spec.rb @@ -16,6 +16,6 @@ RSpec.describe LfsFileLockEntity do it 'exposes the owner info' do expect(subject).to include(:owner) - expect(subject[:owner][:name]).to eq(user.name) + expect(subject[:owner][:name]).to eq(user.username) end end |