diff --git a/config/feature_flags/beta/github_user_mapping.yml b/config/feature_flags/beta/github_user_mapping.yml deleted file mode 100644 index dd7f6d93e4d0094ee5da998b205ad39f4a6c065b..0000000000000000000000000000000000000000 --- a/config/feature_flags/beta/github_user_mapping.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: github_user_mapping -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/466355 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169726 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/499993 -milestone: '17.6' -group: group::import and integrate -type: beta -default_enabled: true \ No newline at end of file diff --git a/doc/user/import/mapping.md b/doc/user/import/mapping.md index daa5993944ddebe4083f68475038ba3f4a620226..bbf22b761039df8175d3b91a2dc050eb2aee980c 100644 --- a/doc/user/import/mapping.md +++ b/doc/user/import/mapping.md @@ -25,6 +25,7 @@ title: Contribution and membership mapping - Reassigning contributions to service accounts, project bots, and group bots [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/573124) in GitLab 18.5 [with a flag](../../administration/feature_flags/_index.md) named `user_mapping_service_account_and_bots`. Enabled by default. - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/512211) in GitLab 18.6 for Gitea. Feature flag `gitea_user_mapping` removed. - Reassigning contributions to a personal namespace owner when importing to a personal namespace [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/211626) in GitLab 18.6. Feature flag `user_mapping_to_personal_namespace_owner` removed. +- [GitHub `github_user_mapping` feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/216774) in GitLab 18.8. {{< /history >}} diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md index 76d637b9c939fce0993731f734dbc5010093b9fc..75e52a503244968fd5e794421e4091adc6d8341c 100644 --- a/doc/user/project/import/github.md +++ b/doc/user/project/import/github.md @@ -71,19 +71,6 @@ on the GitLab instance you import to. {{< /history >}} -Before using [the old method of user contribution mapping](#old-method-of-user-contribution-mapping) for imports to GitLab Self-Managed and GitLab -Dedicated, you must meet certain requirements. Imports to GitLab.com use an [improved method](../../import/mapping.md) -that doesn't require preparation. - -These requirements are: - -- Each GitHub author and assignee in the repository must have a - [public-facing email address](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address). -- The GitHub user's email address must match their GitLab email address. -- If a user's email address in GitHub is set as their secondary email address in GitLab, they must confirm it. - -GitHub Enterprise does not require a public email address, so you might have to add it to existing accounts. - ## Known issues - GitHub pull request comments (known as diff notes in GitLab) created before 2017 are imported in separate threads. @@ -286,24 +273,6 @@ These backticks prevent linking to an incorrect user with the same username on t The GitHub importer uses an [improved method](../../import/mapping.md) of mapping user contributions for GitLab.com, GitLab Self-Managed, and GitLab Dedicated. -### Old method of user contribution mapping - -You can use the old user contribution mapping method for imports to GitLab Self-Managed and GitLab Dedicated instances. -To use this method, `github_user_mapping` must be disabled. -For imports to GitLab.com, you must -use the [improved method](../../import/mapping.md) instead. - -Using the old method, when [user accounts are provisioned correctly](#accounts-for-user-contribution-mapping), users are mapped during the import. - -If the requirements are not met, the importer can't map the particular user's contributions. In that case: - -- The project creator is set as the author and assignee of issues and merge requests. The project creator is usually the - user that initiated the import process. For some contributions that have a description or note such as pull requests, - issue, notes, the importer amends the text with details of who originally created the contribution. -- Reviewers and approvals added on pull requests in GitHub cannot be imported. In this case, the importer creates comments - describing that non-existent users were added as reviewers and approvers. However, the actual reviewer status and - approval are not applied to the merge request in GitLab. - ## Mirror a repository and share pipeline status {{< details >}} diff --git a/lib/gitlab/github_import/settings.rb b/lib/gitlab/github_import/settings.rb index 384b0ad97c624c4259322331821cdb033a7f8543..2ccaf1dd17e949dbc8611709f5e6c0ec76b9ce0e 100644 --- a/lib/gitlab/github_import/settings.rb +++ b/lib/gitlab/github_import/settings.rb @@ -93,11 +93,9 @@ def fetch_stages_from_params(user_settings) end def user_contribution_mapping_enabled? - creator_user_actor = User.actor_from_id(project.creator_id) - flag_by_type = case project.import_type&.to_sym when ::Import::SOURCE_GITHUB - Feature.enabled?(:github_user_mapping, creator_user_actor) + true when ::Import::SOURCE_GITEA true end diff --git a/spec/lib/gitlab/github_import/settings_spec.rb b/spec/lib/gitlab/github_import/settings_spec.rb index cf4ac8594bae991553b3b95d5bbdddfd5a0c6f33..36a894f410c17e1e8f2d772db49522c543ae9c0e 100644 --- a/spec/lib/gitlab/github_import/settings_spec.rb +++ b/spec/lib/gitlab/github_import/settings_spec.rb @@ -105,18 +105,8 @@ project.build_or_assign_import_data(credentials: { user: 'token' }) end - shared_examples 'when :github_user_mapping is disabled' do |expected_enabled:| - before do - Feature.disable(:github_user_mapping) - end - - it { is_expected.to be(expected_enabled) } - end - context 'when the project is a GitHub import' do it { is_expected.to be(true) } - - it_behaves_like 'when :github_user_mapping is disabled', expected_enabled: false end context 'when the project is a Gitea import' do @@ -125,8 +115,6 @@ end it { is_expected.to be(true) } - - it_behaves_like 'when :github_user_mapping is disabled', expected_enabled: true end context 'when the project does not have an import_type' do @@ -135,8 +123,6 @@ end it { is_expected.to be(false) } - - it_behaves_like 'when :github_user_mapping is disabled', expected_enabled: false end context 'when the project has an import_type without a user mapping flag' do @@ -145,8 +131,6 @@ end it { is_expected.to be(false) } - - it_behaves_like 'when :github_user_mapping is disabled', expected_enabled: false end end