diff --git a/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue b/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue index ab166b8fba197d5b303e050ad427563d4116c088..22fd5ca01433e0d2687b54254dd755d902af77ce 100644 --- a/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue +++ b/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue @@ -12,6 +12,7 @@ import { // eslint-disable-next-line no-restricted-imports import { mapState, mapGetters, mapActions } from 'vuex'; import { __, s__ } from '~/locale'; +import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import HelpPageLink from '~/vue_shared/components/help_page_link/help_page_link.vue'; import HelpPopover from '~/vue_shared/components/help_popover.vue'; import ImportTargetDropdown from '../../components/import_target_dropdown.vue'; @@ -35,6 +36,7 @@ export default { GlSprintf, GlModal, }, + mixins: [glFeatureFlagMixin()], inject: { userNamespace: { default: null, @@ -128,6 +130,18 @@ export default { this.updateImportTarget({ newName: value }); }, }, + + personalNamespaceWarning() { + if (this.glFeatures.userMappingToPersonalNamespaceOwner) { + return s__( + 'ImportProjects|When you import to a personal namespace, all contributions are assigned to the personal namespace owner and they cannot be reassigned. To map contributions to real users, import to a group instead.', + ); + } + + return s__( + 'ImportProjects|When you import to a personal namespace, all contributions are assigned to a single non-functional user and they cannot be reassigned. To map contributions to real users, import to a group instead.', + ); + }, }, methods: { @@ -272,11 +286,7 @@ export default { @primary="handleImportRepo" >
- {{
- s__(
- 'ImportProjects|Importing a project into a personal namespace results in all contributions being mapped to the same bot user and they cannot be reassigned. To map contributions to actual users, import the project to a group instead.',
- )
- }}
+ {{ personalNamespaceWarning }}