Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d32d5ac25d
commit
edde77d99a
|
|
@ -966,23 +966,6 @@ Layout/ArgumentAlignment:
|
|||
- 'ee/spec/services/protected_environments/create_service_spec.rb'
|
||||
- 'ee/spec/services/protected_environments/update_service_spec.rb'
|
||||
- 'ee/spec/services/quick_actions/interpret_service_spec.rb'
|
||||
- 'ee/spec/services/security/auto_fix_service_spec.rb'
|
||||
- 'ee/spec/services/security/findings/dismiss_service_spec.rb'
|
||||
- 'ee/spec/services/security/ingestion/finding_map_spec.rb'
|
||||
- 'ee/spec/services/security/ingestion/tasks/ingest_vulnerabilities/create_spec.rb'
|
||||
- 'ee/spec/services/security/ingestion/tasks/ingest_vulnerabilities_spec.rb'
|
||||
- 'ee/spec/services/security/ingestion/tasks/update_vulnerability_uuids_spec.rb'
|
||||
- 'ee/spec/services/security/merge_reports_service_spec.rb'
|
||||
- 'ee/spec/services/security/override_uuids_service_spec.rb'
|
||||
- 'ee/spec/services/security/report_summary_service_spec.rb'
|
||||
- 'ee/spec/services/security/scanned_resources_counting_service_spec.rb'
|
||||
- 'ee/spec/services/security/security_orchestration_policies/create_pipeline_service_spec.rb'
|
||||
- 'ee/spec/services/security/security_orchestration_policies/project_create_service_spec.rb'
|
||||
- 'ee/spec/services/security/security_orchestration_policies/rule_schedule_service_spec.rb'
|
||||
- 'ee/spec/services/security/security_orchestration_policies/scan_pipeline_service_spec.rb'
|
||||
- 'ee/spec/services/security/security_orchestration_policies/sync_scan_result_policies_service_spec.rb'
|
||||
- 'ee/spec/services/security/store_scan_service_spec.rb'
|
||||
- 'ee/spec/services/security/vulnerability_counting_service_spec.rb'
|
||||
- 'ee/spec/services/users/email_verification/send_custom_confirmation_instructions_service_spec.rb'
|
||||
- 'ee/spec/services/vulnerabilities/dismiss_service_spec.rb'
|
||||
- 'ee/spec/services/vulnerabilities/find_or_create_from_security_finding_service_spec.rb'
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import { logError } from '~/lib/logger';
|
|||
import { __ } from '~/locale';
|
||||
import { InternalEvents } from '~/tracking';
|
||||
import Api from '~/api';
|
||||
import createSavedReplyMutation from '../queries/create_saved_reply.mutation.graphql';
|
||||
import updateSavedReplyMutation from '../queries/update_saved_reply.mutation.graphql';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -20,6 +18,7 @@ export default {
|
|||
MarkdownEditor,
|
||||
},
|
||||
mixins: [InternalEvents.mixin()],
|
||||
inject: ['createMutation', 'updateMutation'],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
|
|
@ -92,7 +91,7 @@ export default {
|
|||
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: this.id ? updateSavedReplyMutation : createSavedReplyMutation,
|
||||
mutation: this.id ? this.updateMutation : this.createMutation,
|
||||
variables: {
|
||||
id: this.id,
|
||||
name: this.updateCommentTemplate.name,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { uniqueId } from 'lodash';
|
|||
import { GlDisclosureDropdown, GlTooltip, GlModal, GlModalDirective, GlSprintf } from '@gitlab/ui';
|
||||
import { __ } from '~/locale';
|
||||
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
|
||||
import deleteSavedReplyMutation from '../queries/delete_saved_reply.mutation.graphql';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -15,6 +14,7 @@ export default {
|
|||
directives: {
|
||||
GlModal: GlModalDirective,
|
||||
},
|
||||
inject: ['deleteMutation'],
|
||||
props: {
|
||||
template: {
|
||||
type: Object,
|
||||
|
|
@ -57,7 +57,7 @@ export default {
|
|||
this.isDeleting = true;
|
||||
|
||||
this.$apollo.mutate({
|
||||
mutation: deleteSavedReplyMutation,
|
||||
mutation: this.deleteMutation,
|
||||
variables: {
|
||||
id: this.template.id,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ import createDefaultClient from '~/lib/graphql';
|
|||
import routes from './routes';
|
||||
import App from './components/app.vue';
|
||||
|
||||
export const initCommentTemplates = () => {
|
||||
export const initCommentTemplates = ({
|
||||
fetchAllQuery,
|
||||
fetchSingleQuery,
|
||||
createMutation,
|
||||
deleteMutation,
|
||||
updateMutation,
|
||||
}) => {
|
||||
Vue.use(VueApollo);
|
||||
Vue.use(VueRouter);
|
||||
|
||||
|
|
@ -24,6 +30,13 @@ export const initCommentTemplates = () => {
|
|||
el,
|
||||
router,
|
||||
apolloProvider,
|
||||
provide: {
|
||||
fetchAllQuery,
|
||||
fetchSingleQuery,
|
||||
createMutation,
|
||||
deleteMutation,
|
||||
updateMutation,
|
||||
},
|
||||
render(h) {
|
||||
return h(App);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { __ } from '~/locale';
|
|||
import { convertToGraphQLId } from '~/graphql_shared/utils';
|
||||
import { TYPE_USERS_SAVED_REPLY } from '~/graphql_shared/constants';
|
||||
import CreateForm from '../components/form.vue';
|
||||
import getSavedReply from '../queries/get_saved_reply.query.graphql';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -17,19 +16,21 @@ export default {
|
|||
apollo: {
|
||||
savedReply: {
|
||||
fetchPolicy: fetchPolicies.NETWORK_ONLY,
|
||||
query: getSavedReply,
|
||||
query() {
|
||||
return this.fetchSingleQuery;
|
||||
},
|
||||
variables() {
|
||||
return {
|
||||
id: convertToGraphQLId(TYPE_USERS_SAVED_REPLY, this.$route.params.id),
|
||||
};
|
||||
},
|
||||
update: (r) => r.currentUser.savedReply,
|
||||
update: (r) => r.object.savedReply,
|
||||
skip() {
|
||||
return !this.$route.params.id;
|
||||
},
|
||||
result({
|
||||
data: {
|
||||
currentUser: { savedReply },
|
||||
object: { savedReply },
|
||||
},
|
||||
}) {
|
||||
if (!savedReply) {
|
||||
|
|
@ -39,6 +40,7 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
inject: ['fetchSingleQuery'],
|
||||
data() {
|
||||
return {
|
||||
savedReply: null,
|
||||
|
|
|
|||
|
|
@ -3,24 +3,25 @@
|
|||
import { GlCard, GlLoadingIcon, GlIcon, GlButton } from '@gitlab/ui';
|
||||
import { fetchPolicies } from '~/lib/graphql';
|
||||
import CreateForm from '../components/form.vue';
|
||||
import savedRepliesQuery from '../queries/saved_replies.query.graphql';
|
||||
import List from '../components/list.vue';
|
||||
|
||||
export default {
|
||||
apollo: {
|
||||
savedReplies: {
|
||||
fetchPolicy: fetchPolicies.NETWORK_ONLY,
|
||||
query: savedRepliesQuery,
|
||||
update: (r) => r.currentUser?.savedReplies?.nodes,
|
||||
query() {
|
||||
return this.fetchAllQuery;
|
||||
},
|
||||
update: (r) => r.object?.savedReplies?.nodes,
|
||||
variables() {
|
||||
return {
|
||||
...this.pagination,
|
||||
};
|
||||
},
|
||||
result({ data }) {
|
||||
const pageInfo = data.currentUser?.savedReplies?.pageInfo;
|
||||
const pageInfo = data.object?.savedReplies?.pageInfo;
|
||||
|
||||
this.count = data.currentUser?.savedReplies?.count;
|
||||
this.count = data.object?.savedReplies?.count;
|
||||
|
||||
if (pageInfo) {
|
||||
this.pageInfo = pageInfo;
|
||||
|
|
@ -36,6 +37,7 @@ export default {
|
|||
CreateForm,
|
||||
List,
|
||||
},
|
||||
inject: ['fetchAllQuery'],
|
||||
data() {
|
||||
return {
|
||||
savedReplies: [],
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ export default {
|
|||
},
|
||||
|
||||
onTransaction({ transaction }) {
|
||||
const { filename = '', progress = 0 } = transaction.getMeta('uploadProgress') || {};
|
||||
if (this.uploading === filename) {
|
||||
const { uploading = '', progress = 0 } = transaction.getMeta('uploadProgress') || {};
|
||||
if (this.uploading === uploading) {
|
||||
this.uploadProgress = Math.round(progress * 100);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ export default TaskList.extend({
|
|||
tag: '.task-list',
|
||||
priority: PARSE_HTML_PRIORITY_HIGHEST,
|
||||
},
|
||||
{
|
||||
tag: '.gl-new-dropdown',
|
||||
ignore: true,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ const uploadMedia = async ({ type, editor, file, uploadsPath, renderMarkdown, ev
|
|||
|
||||
uploadFile({ file, uploadsPath, renderMarkdown })
|
||||
.tap((progress) => {
|
||||
chain(editor).setMeta('uploadProgress', { filename: file.name, progress }).run();
|
||||
chain(editor).setMeta('uploadProgress', { uploading: fileId, progress }).run();
|
||||
})
|
||||
.then(({ canonicalSrc }) => {
|
||||
// the position might have changed while uploading, so we need to find it again
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
import { initCommentTemplates } from '~/comment_templates';
|
||||
import fetchAllQuery from './queries/saved_replies.query.graphql';
|
||||
import fetchSingleQuery from './queries/get_saved_reply.query.graphql';
|
||||
import createMutation from './queries/create_saved_reply.mutation.graphql';
|
||||
import deleteMutation from './queries/delete_saved_reply.mutation.graphql';
|
||||
import updateMutation from './queries/update_saved_reply.mutation.graphql';
|
||||
|
||||
initCommentTemplates();
|
||||
initCommentTemplates({
|
||||
fetchAllQuery,
|
||||
fetchSingleQuery,
|
||||
createMutation,
|
||||
deleteMutation,
|
||||
updateMutation,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
query getSavedReply($id: UsersSavedReplyID!) {
|
||||
currentUser {
|
||||
object: currentUser {
|
||||
id
|
||||
savedReply(id: $id) {
|
||||
id
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
query savedReplies($after: String = "", $before: String = "") {
|
||||
currentUser {
|
||||
object: currentUser {
|
||||
id
|
||||
savedReplies(after: $after, before: $before) {
|
||||
nodes {
|
||||
|
|
@ -10,10 +10,7 @@ module Groups
|
|||
private
|
||||
|
||||
def verify_packages_enabled!
|
||||
unless group.packages_feature_enabled? &&
|
||||
Feature.enabled?(:group_level_infrastructure_registry, group.root_ancestor, type: :gitlab_com_derisk)
|
||||
render_404
|
||||
end
|
||||
render_404 unless group.packages_feature_enabled?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -449,14 +449,9 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
@update_current_user_path = expose_path(api_v4_user_preferences_path)
|
||||
@endpoint_metadata_url = endpoint_metadata_url(@project, @merge_request)
|
||||
@endpoint_diff_batch_url = endpoint_diff_batch_url(@project, @merge_request)
|
||||
|
||||
if params[:pin] && Feature.enabled?(:pinned_file, @project)
|
||||
@pinned_file_url = diff_by_file_hash_namespace_project_merge_request_path(
|
||||
format: 'json',
|
||||
id: merge_request.iid,
|
||||
namespace_id: project&.namespace.to_param,
|
||||
project_id: project&.path,
|
||||
file_hash: params[:pin]
|
||||
)
|
||||
@pinned_file_url = pinned_file_url(@project, @merge_request)
|
||||
end
|
||||
|
||||
if merge_request.diffs_batch_cache_with_max_age?
|
||||
|
|
@ -634,6 +629,17 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
diffs_batch_project_json_merge_request_path(project, merge_request, 'json', params)
|
||||
end
|
||||
|
||||
def pinned_file_url(project, merge_request)
|
||||
diff_by_file_hash_namespace_project_merge_request_path(
|
||||
format: 'json',
|
||||
id: merge_request.iid,
|
||||
namespace_id: project&.namespace.to_param,
|
||||
project_id: project&.path,
|
||||
file_hash: params[:pin],
|
||||
diff_head: true
|
||||
)
|
||||
end
|
||||
|
||||
def convert_date_to_epoch(date)
|
||||
Date.strptime(date, "%Y-%m-%d")&.to_time&.to_i if date
|
||||
rescue Date::Error, TypeError
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ module Ci
|
|||
has_many :job_artifacts, through: :builds
|
||||
has_many :build_trace_chunks, class_name: 'Ci::BuildTraceChunk', through: :builds, source: :trace_chunks
|
||||
has_many :trigger_requests, dependent: :destroy, foreign_key: :commit_id, inverse_of: :pipeline # rubocop:disable Cop/ActiveRecordDependent
|
||||
has_many :variables, class_name: 'Ci::PipelineVariable'
|
||||
has_many :variables, ->(pipeline) { in_partition(pipeline) }, class_name: 'Ci::PipelineVariable', inverse_of: :pipeline, partition_foreign_key: :partition_id
|
||||
has_many :latest_builds, ->(pipeline) { in_partition(pipeline).latest.with_project_and_metadata }, foreign_key: :commit_id, inverse_of: :pipeline, class_name: 'Ci::Build'
|
||||
has_many :downloadable_artifacts, -> do
|
||||
not_expired.or(where_exists(Ci::Pipeline.artifacts_locked.where("#{Ci::Pipeline.quoted_table_name}.id = #{Ci::Build.quoted_table_name}.commit_id"))).downloadable.with_job
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ module Ci
|
|||
|
||||
ROUTING_FEATURE_FLAG = :ci_partitioning_use_ci_pipeline_variables_routing_table
|
||||
|
||||
belongs_to :pipeline
|
||||
belongs_to :pipeline,
|
||||
->(pipeline_variable) { in_partition(pipeline_variable) },
|
||||
partition_foreign_key: :partition_id,
|
||||
inverse_of: :variables
|
||||
|
||||
self.primary_key = :id
|
||||
self.sequence_name = :ci_pipeline_variables_id_seq
|
||||
|
|
@ -25,5 +28,9 @@ module Ci
|
|||
def hook_attrs
|
||||
{ key: key, value: value }
|
||||
end
|
||||
|
||||
def self.use_partition_id_filter?
|
||||
Ci::Pipeline.use_partition_id_filter?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
description: Service Ping was requested via REST API endpoint
|
||||
category: InternalEventTracking
|
||||
action: request_service_ping_via_rest
|
||||
product_section: analytics
|
||||
product_stage: monitor
|
||||
product_group: analytics_instrumentation
|
||||
milestone: '16.9'
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143385/
|
||||
distributions:
|
||||
- ce
|
||||
- ee
|
||||
tiers:
|
||||
- free
|
||||
- premium
|
||||
- ultimate
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: code_suggestions_claude21
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/432636
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140436
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/436273
|
||||
milestone: '16.8'
|
||||
group: group::code creation
|
||||
type: development
|
||||
default_enabled: false
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: group_level_infrastructure_registry
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/352041
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140215
|
||||
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17430
|
||||
milestone: '16.9'
|
||||
group: group::package registry
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
key_path: counts.count_total_request_service_ping_via_rest_monthly
|
||||
description: Monthly count of requests for Service Ping payload via REST API
|
||||
product_section: analytics
|
||||
product_stage: monitor
|
||||
product_group: analytics_instrumentation
|
||||
performance_indicator_type: []
|
||||
value_type: number
|
||||
status: active
|
||||
milestone: '16.9'
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143385/
|
||||
time_frame: 28d
|
||||
data_source: internal_events
|
||||
data_category: optional
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
tier:
|
||||
- free
|
||||
- premium
|
||||
- ultimate
|
||||
options:
|
||||
events:
|
||||
- request_service_ping_via_rest
|
||||
events:
|
||||
- name: request_service_ping_via_rest
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
key_path: counts.count_total_request_service_ping_via_rest_weekly
|
||||
description: Weekly count of requests for Service Ping payload via REST API
|
||||
product_section: analytics
|
||||
product_stage: monitor
|
||||
product_group: analytics_instrumentation
|
||||
performance_indicator_type: []
|
||||
value_type: number
|
||||
status: active
|
||||
milestone: '16.9'
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143385/
|
||||
time_frame: 7d
|
||||
data_source: internal_events
|
||||
data_category: optional
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
tier:
|
||||
- free
|
||||
- premium
|
||||
- ultimate
|
||||
options:
|
||||
events:
|
||||
- request_service_ping_via_rest
|
||||
events:
|
||||
- name: request_service_ping_via_rest
|
||||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Keeps connection between merge request and project approval rule
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8497
|
||||
milestone: '11.7'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: approval_project_rule_id
|
||||
table: approval_project_rules
|
||||
sharding_key: project_id
|
||||
belongs_to: approval_project_rule
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Keeps approval merge request rules
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8497
|
||||
milestone: '11.7'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: merge_request_id
|
||||
table: merge_requests
|
||||
sharding_key: target_project_id
|
||||
belongs_to: merge_request
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Keeps relation between approval project rules and protected branches.
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22673
|
||||
milestone: '12.7'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: approval_project_rule_id
|
||||
table: approval_project_rules
|
||||
sharding_key: project_id
|
||||
belongs_to: approval_project_rule
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Keeps connection between user and a project approval rule
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8497
|
||||
milestone: '11.7'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: approval_project_rule_id
|
||||
table: approval_project_rules
|
||||
sharding_key: project_id
|
||||
belongs_to: approval_project_rule
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Stores merge request approvals made by users
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/73faf3c7289c4fa4535b752a12247ee74b173976
|
||||
milestone: '7.12'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: merge_request_id
|
||||
table: merge_requests
|
||||
sharding_key: target_project_id
|
||||
belongs_to: merge_request
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Keeps relation between blocked and blocking merge requests
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/27323
|
||||
milestone: '11.11'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: blocking_merge_request_id
|
||||
table: merge_requests
|
||||
sharding_key: target_project_id
|
||||
belongs_to: blocking_merge_request
|
||||
|
|
|
|||
|
|
@ -7,4 +7,19 @@ feature_categories:
|
|||
description: Stores create access settings for protected tags
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/07d7d8e65905a39164b63f55eccdcea8f10f5d14
|
||||
milestone: '9.1'
|
||||
gitlab_schema: gitlab_main
|
||||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_joins:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_transactions:
|
||||
- gitlab_main_clusterwide
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
project_id:
|
||||
references: projects
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: protected_tag_id
|
||||
table: protected_tags
|
||||
sharding_key: project_id
|
||||
belongs_to: protected_tag
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ For example:
|
|||
|
||||
```toml
|
||||
[metadata]
|
||||
zip_reader_limit_bytes = 2097152 # 200 MB
|
||||
zip_reader_limit_bytes = 209715200 # 200 MB
|
||||
```
|
||||
|
||||
## Error tracking
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ that are the largest value contributors, overperforming, or underperforming.
|
|||
You can also drill down the metrics for further analysis.
|
||||
When you hover over a metric, a tooltip displays an explanation of the metric and a link to the related documentation page.
|
||||
|
||||
The monthly values also indicate a percentage increase or decrease compared to the previous month.
|
||||
|
||||
The sparkline for the past six months represents value trends over this time period, not the percentage change rate.
|
||||
The sparkline color ranges from blue to green, where green indicates a positive trend, and blue indicates a negative trend.
|
||||
Sparklines help you identify patterns in metric trends (such as seasonal changes) over time.
|
||||
|
||||
NOTE:
|
||||
The contributor count metric is available only on GitLab.com at the group-level. To view this metric in the comparison panel, you must [set up ClickHouse](../../integration/clickhouse.md), and enable the [feature flags](../../administration/feature_flags.md) `clickhouse_data_collection` and `event_sync_worker_for_click_house`.
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,12 @@ for the group's projects to meet your group's needs.
|
|||
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) in GitLab 14.9. [Feature flag `invite_members_group_modal`](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) removed.
|
||||
|
||||
Similar to how you [share a project with a group](../project/members/share_project_with_groups.md),
|
||||
you can share a group with another group by invitation. To invite a group, you must be a member of the inviting group.
|
||||
you can share a group with another group by invitation.
|
||||
For more information about sharing conditions and behavior, see [Sharing projects and groups](../project/members/sharing_projects_groups.md).
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must be a member of the inviting group.
|
||||
|
||||
To invite a group to your group:
|
||||
|
||||
|
|
@ -125,19 +130,6 @@ To invite a group to your group:
|
|||
1. Select a [role](../permissions.md) as maximum access level.
|
||||
1. Select **Invite**.
|
||||
|
||||
After inviting a group to your group:
|
||||
|
||||
- The **Groups** tab lists the invited group. This list includes both public and private groups.
|
||||
- From [GitLab 16.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134623),
|
||||
the invited group's name and membership source are masked, unless either:
|
||||
- The invited group is public.
|
||||
- The current user is a member of the invited group.
|
||||
- The current user is a member of the current group.
|
||||
- All direct members of the invited group have access to the inviting group. The least access is granted between the access in the invited group and the access in the inviting group.
|
||||
For example, if a member has the Maintainer role in the invited group, and that group is invited with the Developer role, the member has the Developer role in the inviting group.
|
||||
- Inherited members of the invited group do not gain access to the inviting group.
|
||||
- Direct members of the invited group who have the **Group Invite** badge next to their profile on the group's usage quota page count towards the billable members of the inviting group.
|
||||
|
||||
## Remove an invited group
|
||||
|
||||
To remove an invited group:
|
||||
|
|
@ -147,7 +139,7 @@ To remove an invited group:
|
|||
1. Select the **Groups** tab.
|
||||
1. To the right of the account you want to remove, select **Remove group** (**{remove}**).
|
||||
|
||||
For example, when you remove the invited group from your group:
|
||||
When you remove the invited group from your group:
|
||||
|
||||
- All direct members of the invited group no longer have access to the inviting group.
|
||||
- Members of the invited group no longer count towards the billable members of the inviting group.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ DETAILS:
|
|||
|
||||
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3221) in GitLab 14.0.
|
||||
> - Infrastructure registry and Terraform Module Registry [merged](https://gitlab.com/gitlab-org/gitlab/-/issues/404075) into a single Terraform Module Registry feature in GitLab 15.11.
|
||||
> - Support for groups [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140215) in GitLab 16.9.
|
||||
|
||||
With the Terraform Module Registry, you can use GitLab projects as a
|
||||
private registry for terraform modules. You can create and publish
|
||||
|
|
@ -20,10 +21,10 @@ projects.
|
|||
|
||||
## View Terraform modules
|
||||
|
||||
To view Terraform modules in your project:
|
||||
To view Terraform modules in your project or group:
|
||||
|
||||
1. Go to the project.
|
||||
1. On the left sidebar, select **Operate > Terraform modules**.
|
||||
1. On the left sidebar, select **Search or go to** and find your project or group.
|
||||
1. Select **Operate > Terraform modules**.
|
||||
|
||||
You can search, sort, and filter modules on this page.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,60 +10,6 @@ DETAILS:
|
|||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** SaaS, self-managed
|
||||
|
||||
When you want a group to have access to your project,
|
||||
you can invite [a group](../../group/index.md) to the project.
|
||||
The group's direct and inherited members get access to the project, which becomes a *shared project*.
|
||||
|
||||
In this case, inherited members are members that are inherited from parent groups into the groups that are shared.
|
||||
Only members of the group that is shared get access to the project.
|
||||
If you want to give members of a subgroup of the group you are sharing access to the project, you have to share the subgroup.
|
||||
|
||||
The following table provides an overview of the group members that get access to a shared project.
|
||||
|
||||
| Group member source | Access to shared project |
|
||||
|------------------------------------------------------------------|------------------------|
|
||||
| Direct member of the group that is shared | **{check-circle}** Yes |
|
||||
| Inherited member of the group that is shared | **{check-circle}** Yes |
|
||||
| Direct member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
|
||||
| Inherited member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
|
||||
|
||||
## Example
|
||||
|
||||
For a project that was created by `Group 1`:
|
||||
|
||||
- The members of `Group 1` have access to the project.
|
||||
- The owner of `Group 1` can invite `Group 2` to the project.
|
||||
This way, members of both `Group 1` and `Group 2` have access to the shared project.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To invite a group to a project, you must be at least one of the following:
|
||||
|
||||
- Explicitly defined as a [member](index.md) of the project.
|
||||
- Explicitly defined as a member of a group or subgroup that has access to the project.
|
||||
- An administrator.
|
||||
|
||||
In addition:
|
||||
|
||||
- You must be a member of the group or the subgroup being invited.
|
||||
|
||||
- The [visibility level](../../public_access.md) of the group you're inviting
|
||||
must be at least as restrictive as that of the project. For example, you can invite:
|
||||
- A _private_ group to a _private_ project
|
||||
- A _private_ group to an _internal_ project.
|
||||
- A _private_ group to a _public_ project.
|
||||
- An _internal_ group to an _internal_ project.
|
||||
- An _internal_ group to a _public_ project.
|
||||
- A _public_ group to a _public_ project.
|
||||
|
||||
- If a group in the project's hierarchy [does not allow projects to be shared with groups](../../group/access_and_permissions.md#prevent-a-project-from-being-shared-with-groups), the option to **Invite a group** is not available.
|
||||
- If the project's root ancestor group [does not allow the project to be shared outside the hierarchy](../../group/access_and_permissions.md#prevent-group-sharing-outside-the-group-hierarchy), the invited group or subgroup must be in the project's [namespace](../../namespace/index.md).
|
||||
For example, a project in the namespace `group/subgroup01/project`:
|
||||
- Can be shared with `group/subgroup02` or `group/subgroup01/subgroup03`.
|
||||
- Cannot be shared with `group_abc`.
|
||||
|
||||
## Share a project with a group
|
||||
|
||||
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/247208) in GitLab 13.11 from a form to a modal window [with a flag](../../feature_flags.md). Disabled by default.
|
||||
> - Modal window [enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/247208) in GitLab 14.8.
|
||||
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) in GitLab 14.9. [Feature flag `invite_members_group_modal`](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) removed.
|
||||
|
|
@ -71,6 +17,14 @@ In addition:
|
|||
Similar to how you [share a group with another group](../../group/manage.md#share-a-group-with-another-group),
|
||||
you can share a project with a group by inviting that group to the project.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must be at least one of the following:
|
||||
- Explicitly defined as a [member](index.md) of the project.
|
||||
- Explicitly defined as a member of a group or subgroup that has access to the project.
|
||||
- An administrator.
|
||||
- You must be a member of the inviting group or subgroup.
|
||||
|
||||
To invite a group to a project:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
|
|
@ -81,24 +35,6 @@ To invite a group to a project:
|
|||
1. Optional. Select an **Access expiration date**.
|
||||
1. Select **Invite**.
|
||||
|
||||
The following members are given access to the project:
|
||||
|
||||
- All direct group members.
|
||||
- Inherited group members.
|
||||
- Members of other groups that have access to the group being invited (by [group share](../../group/manage.md#share-a-group-with-another-group))
|
||||
|
||||
In addition:
|
||||
|
||||
- On the group's page, the project is listed on the **Shared projects** tab.
|
||||
- On the project's **Members** page, the group is listed on the **Groups** tab.
|
||||
- From [GitLab 16.6](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134623),
|
||||
the invited group's name and membership source will be masked unless:
|
||||
- the group is public, or
|
||||
- the current user is a member of the group, or
|
||||
- the current user is a member of the project.
|
||||
- Each user is assigned a maximum role.
|
||||
- Members who have the **Project Invite** badge next to their profile on the usage quota page count towards the billable members of the shared project's top-level group.
|
||||
|
||||
## Maximum role
|
||||
|
||||
When you invite a group to a project, the maximum role is the highest level of access the invited group members are allowed to have in the project.
|
||||
|
|
@ -146,5 +82,6 @@ A list of shared projects is displayed.
|
|||
|
||||
## Related topics
|
||||
|
||||
- [Sharing projects and groups](sharing_projects_groups.md)
|
||||
- [Prevent a project from being shared with groups](../../group/access_and_permissions.md#prevent-a-project-from-being-shared-with-groups).
|
||||
- [Prevent group sharing outside the group hierarchy](../../group/access_and_permissions.md#prevent-group-sharing-outside-the-group-hierarchy).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Sharing projects and groups
|
||||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** SaaS, self-managed
|
||||
|
||||
You can share by invitation:
|
||||
|
||||
- [A project with a group](share_project_with_groups.md).
|
||||
- [A group with another group](../../group/manage.md#share-a-group-with-another-group).
|
||||
|
||||
## Sharing a project with a group
|
||||
|
||||
When you want a group to have access to your project,
|
||||
you can invite the [group](../../group/index.md) to the project.
|
||||
The group's direct and inherited members get access to the project, which becomes a **shared project**.
|
||||
|
||||
In this case, inherited members are members that are inherited from parent groups into the groups that are shared.
|
||||
Only members of the group that is shared get access to the project.
|
||||
If you want to give members of a subgroup of the group you are sharing access to the project, you have to share the subgroup.
|
||||
|
||||
The following table provides an overview of the group members that get access to a shared project.
|
||||
|
||||
| Group member source | Access to shared project |
|
||||
|---------------------------------------------------------------------|--------------------------|
|
||||
| Direct member of the group that is shared | **{check-circle}** Yes |
|
||||
| Inherited member of the group that is shared | **{check-circle}** Yes |
|
||||
| Direct member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
|
||||
| Inherited member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
|
||||
|
||||
The [visibility level](../../public_access.md) of the group you're inviting must be at least as restrictive as that of the project.
|
||||
For example, you can invite:
|
||||
|
||||
- A **private** group to a **private** project.
|
||||
- A **private** group to an **internal** project.
|
||||
- A **private** group to a **public** project.
|
||||
- An **internal** group to an **internal** project.
|
||||
- An **internal** group to a **public** project.
|
||||
- A **public** group to a **public** project.
|
||||
|
||||
If the project's top-level group [does not allow the project to be shared outside the hierarchy](../../group/access_and_permissions.md#prevent-group-sharing-outside-the-group-hierarchy), the invited group or subgroup must be in the project's [namespace](../../namespace/index.md).
|
||||
|
||||
If a group in the project's hierarchy [does not allow projects to be shared with groups](../../group/access_and_permissions.md#prevent-a-project-from-being-shared-with-groups), the option to **Invite a group** is not available.
|
||||
|
||||
[In GitLab 16.6 and later](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134623),
|
||||
the invited group's name and membership source are masked unless one of the following applies:
|
||||
|
||||
- The invited group is public.
|
||||
- The current user is a member of the invited group.
|
||||
- The current user is a member of the current group.
|
||||
|
||||
### Member access and roles
|
||||
|
||||
When you share a project, the following members get access to the project:
|
||||
|
||||
- All direct group members.
|
||||
- Inherited group members.
|
||||
- Members of other [groups that are shared](../../group/manage.md#share-a-group-with-another-group) with the invited group.
|
||||
|
||||
In addition:
|
||||
|
||||
- On the group's page, the project is listed on the **Shared projects** tab.
|
||||
- On the project's **Members** page, the group is listed on the **Groups** tab.
|
||||
- Each user is assigned a maximum role.
|
||||
- On the usage quota page, members who have the **Project Invite** badge next to their profile count towards the billable members of the shared project's top-level group.
|
||||
|
||||
### Examples
|
||||
|
||||
A project in the namespace `group/subgroup01/project`:
|
||||
|
||||
- Can be shared with `group/subgroup02` or `group/subgroup01/subgroup03`.
|
||||
- Can be shared with `group_abc` unless the project's top-level group does not allow the project to be shared outside the hierarchy.
|
||||
|
||||
For a project that was created by `Group 1`:
|
||||
|
||||
- The members of `Group 1` have access to the project.
|
||||
- The owner of `Group 1` can invite `Group 2` to the project.
|
||||
This way, members of both `Group 1` and `Group 2` have access to the shared project.
|
||||
|
||||
## Sharing a group with another group
|
||||
|
||||
After you invite a group to your group:
|
||||
|
||||
- The **Groups** tab lists the invited group. This list includes both public and private groups. The invited group's name and membership source are masked from members who do not have access to the invited group.
|
||||
- All direct members of the invited group have access to the inviting group.
|
||||
The least access is granted between the access in the invited group and the access in the inviting group.
|
||||
- Inherited members of the invited group do not gain access to the inviting group.
|
||||
- On the group's usage quota page, direct members of the invited group who have the **Group Invite** badge
|
||||
next to their profile count towards the billable members of the inviting group.
|
||||
|
||||
### Examples
|
||||
|
||||
`User A` is a direct member of `Group 1` and has the Maintainer role in the group.
|
||||
`Group 2` invites `Group 1` with the Developer role.
|
||||
`User A` has the Developer role in `Group 2`.
|
||||
|
||||
`User B` is an inherited member of `Group 1`. This user doesn't get access to `Group 2` when `Group 1` is invited.
|
||||
|
|
@ -36,6 +36,8 @@ module API
|
|||
get do
|
||||
content_type 'application/json'
|
||||
|
||||
Gitlab::InternalEvents.track_event('request_service_ping_via_rest', user: current_user)
|
||||
|
||||
Rails.cache.fetch(Gitlab::Usage::ServicePingReport::CACHE_KEY) ||
|
||||
::RawUsageData.for_current_reporting_cycle.first&.payload || {}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -58,10 +58,7 @@ module Sidebars
|
|||
end
|
||||
|
||||
def infrastructure_registry_menu_item
|
||||
unless context.group.packages_feature_enabled? &&
|
||||
Feature.enabled?(:group_level_infrastructure_registry, context.group.root_ancestor, type: :gitlab_com_derisk)
|
||||
return nil_menu_item(:infrastructure_registry)
|
||||
end
|
||||
return nil_menu_item(:infrastructure_registry) unless context.group.packages_feature_enabled?
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('Terraform modules'),
|
||||
|
|
|
|||
|
|
@ -54891,6 +54891,9 @@ msgstr ""
|
|||
msgid "Vulnerability|%{scannerName} (version %{scannerVersion})"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vulnerability|A solution is available for this vulnerability"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vulnerability|Activity"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -54948,6 +54951,9 @@ msgstr ""
|
|||
msgid "Vulnerability|Crash type:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vulnerability|Create a merge request to implement this solution, or download and apply the patch manually."
|
||||
msgstr ""
|
||||
|
||||
msgid "Vulnerability|Description"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -258,7 +258,8 @@ RSpec.describe Projects::MergeRequestsController, feature_category: :code_review
|
|||
id: merge_request.iid,
|
||||
namespace_id: project.namespace.to_param,
|
||||
project_id: project.path,
|
||||
file_hash: file_hash
|
||||
file_hash: file_hash,
|
||||
diff_head: true
|
||||
))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import createMockApollo from 'helpers/mock_apollo_helper';
|
|||
import { mockTracking } from 'helpers/tracking_helper';
|
||||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
import Form from '~/comment_templates/components/form.vue';
|
||||
import createSavedReplyMutation from '~/comment_templates/queries/create_saved_reply.mutation.graphql';
|
||||
import updateSavedReplyMutation from '~/comment_templates/queries/update_saved_reply.mutation.graphql';
|
||||
import createSavedReplyMutation from '~/pages/profiles/comment_templates/queries/create_saved_reply.mutation.graphql';
|
||||
import updateSavedReplyMutation from '~/pages/profiles/comment_templates/queries/update_saved_reply.mutation.graphql';
|
||||
|
||||
let wrapper;
|
||||
let createSavedReplyResponseSpy;
|
||||
|
|
@ -36,6 +36,10 @@ function createComponent(id = null, response = createdSavedReplyResponse) {
|
|||
propsData: {
|
||||
id,
|
||||
},
|
||||
provide: {
|
||||
createMutation: createSavedReplyMutation,
|
||||
updateMutation: updateSavedReplyMutation,
|
||||
},
|
||||
apolloProvider: mockApollo,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { __ } from '~/locale';
|
|||
import createMockApollo from 'helpers/mock_apollo_helper';
|
||||
import { createMockDirective } from 'helpers/vue_mock_directive';
|
||||
import ListItem from '~/comment_templates/components/list_item.vue';
|
||||
import deleteSavedReplyMutation from '~/comment_templates/queries/delete_saved_reply.mutation.graphql';
|
||||
import deleteSavedReplyMutation from '~/pages/profiles/comment_templates/queries/delete_saved_reply.mutation.graphql';
|
||||
|
||||
function createMockApolloProvider(requestHandlers = [deleteSavedReplyMutation]) {
|
||||
Vue.use(VueApollo);
|
||||
|
|
@ -29,6 +29,9 @@ describe('Comment templates list item component', () => {
|
|||
GlModal: createMockDirective('gl-modal'),
|
||||
},
|
||||
apolloProvider,
|
||||
provide: {
|
||||
deleteMutation: deleteSavedReplyMutation,
|
||||
},
|
||||
mocks: {
|
||||
$router,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,13 +3,17 @@ import noSavedRepliesResponse from 'test_fixtures/graphql/comment_templates/save
|
|||
import savedRepliesResponse from 'test_fixtures/graphql/comment_templates/saved_replies.query.graphql.json';
|
||||
import List from '~/comment_templates/components/list.vue';
|
||||
import ListItem from '~/comment_templates/components/list_item.vue';
|
||||
import deleteSavedReplyMutation from '~/pages/profiles/comment_templates/queries/delete_saved_reply.mutation.graphql';
|
||||
|
||||
let wrapper;
|
||||
|
||||
function createComponent(res = {}) {
|
||||
const { savedReplies } = res.data.currentUser;
|
||||
const { savedReplies } = res.data.object;
|
||||
|
||||
return mount(List, {
|
||||
provide: {
|
||||
deleteMutation: deleteSavedReplyMutation,
|
||||
},
|
||||
propsData: {
|
||||
savedReplies: savedReplies.nodes,
|
||||
pageInfo: savedReplies.pageInfo,
|
||||
|
|
@ -26,7 +30,7 @@ describe('Comment templates list component', () => {
|
|||
});
|
||||
|
||||
it('renders list of comment templates', () => {
|
||||
const savedReplies = savedRepliesResponse.data.currentUser.savedReplies.nodes;
|
||||
const savedReplies = savedRepliesResponse.data.object.savedReplies.nodes;
|
||||
wrapper = createComponent(savedRepliesResponse);
|
||||
|
||||
expect(wrapper.findAllComponents(ListItem).length).toBe(2);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import createMockApollo from 'helpers/mock_apollo_helper';
|
|||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
import IndexPage from '~/comment_templates/pages/index.vue';
|
||||
import ListItem from '~/comment_templates/components/list_item.vue';
|
||||
import savedRepliesQuery from '~/comment_templates/queries/saved_replies.query.graphql';
|
||||
import savedRepliesQuery from '~/pages/profiles/comment_templates/queries/saved_replies.query.graphql';
|
||||
import deleteSavedReplyMutation from '~/pages/profiles/comment_templates/queries/delete_saved_reply.mutation.graphql';
|
||||
|
||||
let wrapper;
|
||||
|
||||
|
|
@ -23,13 +24,17 @@ function createComponent(options = {}) {
|
|||
|
||||
return mount(IndexPage, {
|
||||
apolloProvider: mockApollo,
|
||||
provide: {
|
||||
fetchAllQuery: savedRepliesQuery,
|
||||
deleteMutation: deleteSavedReplyMutation,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
describe('Comment templates index page component', () => {
|
||||
it('renders list of comment templates', async () => {
|
||||
const mockApollo = createMockApolloProvider(savedRepliesResponse);
|
||||
const savedReplies = savedRepliesResponse.data.currentUser.savedReplies.nodes;
|
||||
const savedReplies = savedRepliesResponse.data.object.savedReplies.nodes;
|
||||
wrapper = createComponent({ mockApollo });
|
||||
|
||||
await waitForPromises();
|
||||
|
|
|
|||
|
|
@ -141,13 +141,13 @@ describe.each`
|
|||
|
||||
const setUploadProgress = async (progress) => {
|
||||
const transaction = createTransactionWithMeta('uploadProgress', {
|
||||
filename: filePath,
|
||||
uploading: 'file-123',
|
||||
progress,
|
||||
});
|
||||
await emitEditorEvent({ event: 'transaction', tiptapEditor, params: { transaction } });
|
||||
};
|
||||
|
||||
tiptapEditor.chain().selectAll().updateAttributes(mediaType, { uploading: filePath }).run();
|
||||
tiptapEditor.chain().selectAll().updateAttributes(mediaType, { uploading: 'file-123' }).run();
|
||||
|
||||
await emitEditorEvent({ event: 'selectionUpdate', tiptapEditor });
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ RSpec.describe GraphQL::Query, type: :request, feature_category: :user_profile d
|
|||
end
|
||||
|
||||
context 'when user has no comment templates' do
|
||||
base_input_path = 'comment_templates/queries/'
|
||||
base_input_path = 'pages/profiles/comment_templates/queries/'
|
||||
base_output_path = 'graphql/comment_templates/'
|
||||
query_name = 'saved_replies.query.graphql'
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ RSpec.describe GraphQL::Query, type: :request, feature_category: :user_profile d
|
|||
end
|
||||
|
||||
context 'when user has comment templates' do
|
||||
base_input_path = 'comment_templates/queries/'
|
||||
base_input_path = 'pages/profiles/comment_templates/queries/'
|
||||
base_output_path = 'graphql/comment_templates/'
|
||||
query_name = 'saved_replies.query.graphql'
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ RSpec.describe GraphQL::Query, type: :request, feature_category: :user_profile d
|
|||
end
|
||||
|
||||
context 'when user creates comment template' do
|
||||
base_input_path = 'comment_templates/queries/'
|
||||
base_input_path = 'pages/profiles/comment_templates/queries/'
|
||||
base_output_path = 'graphql/comment_templates/'
|
||||
query_name = 'create_saved_reply.mutation.graphql'
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ RSpec.describe GraphQL::Query, type: :request, feature_category: :user_profile d
|
|||
end
|
||||
|
||||
context 'when user creates comment template and it errors' do
|
||||
base_input_path = 'comment_templates/queries/'
|
||||
base_input_path = 'pages/profiles/comment_templates/queries/'
|
||||
base_output_path = 'graphql/comment_templates/'
|
||||
query_name = 'create_saved_reply.mutation.graphql'
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ let savedRepliesResp;
|
|||
function createMockApolloProvider(response) {
|
||||
Vue.use(VueApollo);
|
||||
|
||||
savedRepliesResp = jest.fn().mockResolvedValue(response);
|
||||
savedRepliesResp = jest
|
||||
.fn()
|
||||
.mockResolvedValue({ data: { currentUser: { ...response.data.object } } });
|
||||
|
||||
const requestHandlers = [[savedRepliesQuery, savedRepliesResp]];
|
||||
|
||||
|
|
@ -50,7 +52,7 @@ async function selectSavedReply() {
|
|||
|
||||
await waitForPromises();
|
||||
|
||||
dropdown.vm.$emit('select', savedRepliesResponse.data.currentUser.savedReplies.nodes[0].id);
|
||||
dropdown.vm.$emit('select', savedRepliesResponse.data.object.savedReplies.nodes[0].id);
|
||||
}
|
||||
|
||||
useMockLocationHelper();
|
||||
|
|
|
|||
|
|
@ -202,14 +202,6 @@ RSpec.describe Sidebars::Groups::Menus::PackagesRegistriesMenu, feature_category
|
|||
let(:packages_enabled) { true }
|
||||
|
||||
it_behaves_like 'the menu entry is available'
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(group_level_infrastructure_registry: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'the menu entry is not available'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,13 @@ RSpec.describe API::UsageData, feature_category: :service_ping do
|
|||
|
||||
expect(response.body).to eq(usage_data.to_json)
|
||||
end
|
||||
|
||||
it 'tracks an internal event' do
|
||||
expect(Gitlab::InternalEvents).to receive(:track_event)
|
||||
.with('request_service_ping_via_rest', user: user)
|
||||
|
||||
get api(endpoint, personal_access_token: personal_access_token)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -36,14 +36,6 @@ RSpec.describe Groups::InfrastructureRegistryController, feature_category: :pack
|
|||
|
||||
it_behaves_like 'returning response status', :not_found
|
||||
end
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(group_level_infrastructure_registry: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'returning response status', :not_found
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ require (
|
|||
github.com/stretchr/testify v1.8.4
|
||||
gitlab.com/gitlab-org/gitaly/v16 v16.9.0-rc3
|
||||
gitlab.com/gitlab-org/labkit v1.21.0
|
||||
gocloud.dev v0.35.0
|
||||
gocloud.dev v0.36.0
|
||||
golang.org/x/image v0.14.0
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
|
||||
golang.org/x/net v0.20.0
|
||||
golang.org/x/oauth2 v0.14.0
|
||||
golang.org/x/oauth2 v0.16.0
|
||||
golang.org/x/tools v0.17.0
|
||||
google.golang.org/grpc v1.60.1
|
||||
google.golang.org/grpc v1.61.0
|
||||
google.golang.org/protobuf v1.32.0
|
||||
honnef.co/go/tools v0.4.6
|
||||
)
|
||||
|
|
|
|||
|
|
@ -96,25 +96,25 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
|
|||
github.com/aws/aws-sdk-go v1.44.256/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go v1.49.3 h1:+UGwhC3kChk0pRCxSsbaQSNIc8MfFURQL44Ig6RRR3I=
|
||||
github.com/aws/aws-sdk-go v1.49.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2 h1:3q7vcLhq6JXqTLPpPuDJgw3f+DFqd4p+BWL2DlplRPc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 h1:FJTWR2nP1ddLIbk4n7Glw8wGbeWGHaViUwADPzE/EBo=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA=
|
||||
github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI=
|
||||
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg=
|
||||
github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM=
|
||||
github.com/beevik/ntp v1.3.0 h1:/w5VhpW5BGKS37vFm1p9oVk/t4HnnkKZAZIubHM6F7Q=
|
||||
github.com/beevik/ntp v1.3.0/go.mod h1:vD6h1um4kzXpqmLTuu0cCLcC+NfvC0IC+ltmEDA8E78=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
|
|
@ -464,8 +464,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A
|
|||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||
gocloud.dev v0.35.0 h1:x/Gtt5OJdT4j+ir1AXAIXb7bBnFawXAAaJptCUGk3HU=
|
||||
gocloud.dev v0.35.0/go.mod h1:wbyF+BhfdtLWyUtVEWRW13hFLb1vXnV2ovEhYGQe3ck=
|
||||
gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus=
|
||||
gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
|
@ -581,8 +581,8 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ
|
|||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0=
|
||||
golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM=
|
||||
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
|
||||
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
|
||||
golang.org/x/sync v0.0.0-20170517211232-f52d1811a629/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -882,8 +882,8 @@ google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
|
|||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
|
||||
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
|
||||
google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
|
||||
google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
|
|
|
|||
Loading…
Reference in New Issue