Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-07-16 15:09:56 +00:00
parent d8bc65941a
commit cd88479dc1
8 changed files with 47 additions and 24 deletions

View File

@ -46,7 +46,7 @@ export default {
return sprintf( return sprintf(
s__(`AdminProjects| s__(`AdminProjects|
Youre about to permanently delete the project %{projectName}, its repository, Youre about to permanently delete the project %{projectName}, its repository,
and all related resources including issues, merge requests, etc.. Once you confirm and press and all related resources, including issues and merge requests. Once you confirm and press
%{strong_start}Delete project%{strong_end}, it cannot be undone or recovered.`), %{strong_start}Delete project%{strong_end}, it cannot be undone or recovered.`),
{ {
projectName: `<strong>${escape(this.projectName)}</strong>`, projectName: `<strong>${escape(this.projectName)}</strong>`,

View File

@ -24,9 +24,6 @@ export default {
alertBody: __( alertBody: __(
'Once a project is permanently deleted, it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd}, including issues, merge requests etc.', 'Once a project is permanently deleted, it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd}, including issues, merge requests etc.',
), ),
modalBody: __(
"This action cannot be undone. You will lose this project's repository and all related resources, including issues, merge requests, etc.",
),
}, },
}; };
</script> </script>
@ -46,7 +43,6 @@ export default {
</template> </template>
</gl-sprintf> </gl-sprintf>
</gl-alert> </gl-alert>
<p>{{ $options.strings.modalBody }}</p>
</template> </template>
</shared-delete-button> </shared-delete-button>
</template> </template>

View File

@ -57,4 +57,8 @@ body.gl-dark {
} }
} }
} }
.md code {
background-color: $gray-200;
}
} }

View File

@ -3,7 +3,7 @@
.sub-section .sub-section
%h4.danger-title= _('Delete project') %h4.danger-title= _('Delete project')
%p %p
%strong= _('Deleting the project will delete its repository and all related resources including issues, merge requests, etc.') %strong= _('Deleting the project will delete its repository and all related resources, including issues and merge requests.')
= link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'removing-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer' = link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'removing-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer'
%p %p
%strong= _('Deleted projects cannot be restored!') %strong= _('Deleted projects cannot be restored!')

View File

@ -364,13 +364,18 @@ namespace if needed.
#### Delete a project #### Delete a project
NOTE: You can mark a project to be deleted.
Only project Owners and administrators have [permissions](../../permissions.md#project-members-permissions) to delete a project.
Prerequisite:
- You must have at least the Owner role for a project.
To delete a project: To delete a project:
1. Navigate to your project, and select **Settings > General > Advanced**. 1. On the top bar, select **Menu > Projects** and find your project.
1. In the "Delete project" section, click the **Delete project** button. 1. On the left sidebar, select **Settings > General**.
1. Expand **Advanced**.
1. In the "Delete project" section, select **Delete project**.
1. Confirm the action when asked to. 1. Confirm the action when asked to.
This action deletes a project including all associated resources (issues, merge requests, and so on). This action deletes a project including all associated resources (issues, merge requests, and so on).
@ -385,6 +390,28 @@ WARNING:
The default behavior of [delayed project deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6 was changed to The default behavior of [delayed project deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6 was changed to
[Immediate deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) in GitLab 13.2. [Immediate deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) in GitLab 13.2.
#### Delete a project immediately **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/191367) in GitLab 14.1.
If you don't want to wait, you can delete a project immediately.
Prerequisites:
- You must have at least the Owner role for a project.
- You have [marked the project for deletion](#delete-a-project).
To immediately delete a project marked for deletion:
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > General**.
1. Expand **Advanced**.
1. In the "Permanently delete project" section, select **Delete project**.
1. Confirm the action when asked to.
Your project, its repository, and all related resources, including issues and merge requests,
are deleted.
#### Restore a project **(PREMIUM)** #### Restore a project **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6.

View File

@ -2368,7 +2368,7 @@ msgstr ""
msgid "AdminDashboard|Error loading the statistics. Please try again" msgid "AdminDashboard|Error loading the statistics. Please try again"
msgstr "" msgstr ""
msgid "AdminProjects| Youre about to permanently delete the project %{projectName}, its repository, and all related resources including issues, merge requests, etc.. Once you confirm and press %{strong_start}Delete project%{strong_end}, it cannot be undone or recovered." msgid "AdminProjects| Youre about to permanently delete the project %{projectName}, its repository, and all related resources, including issues and merge requests. Once you confirm and press %{strong_start}Delete project%{strong_end}, it cannot be undone or recovered."
msgstr "" msgstr ""
msgid "AdminProjects|Delete" msgid "AdminProjects|Delete"
@ -10713,7 +10713,7 @@ msgstr ""
msgid "Deleting a user has the following effects:" msgid "Deleting a user has the following effects:"
msgstr "" msgstr ""
msgid "Deleting the project will delete its repository and all related resources including issues, merge requests, etc." msgid "Deleting the project will delete its repository and all related resources, including issues and merge requests."
msgstr "" msgstr ""
msgid "Deletion pending. This project will be deleted on %{date}. Repository and other project resources are read-only." msgid "Deletion pending. This project will be deleted on %{date}. Repository and other project resources are read-only."
@ -23070,7 +23070,7 @@ msgstr ""
msgid "Once a project is permanently deleted, it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd}, including issues, merge requests etc." msgid "Once a project is permanently deleted, it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd}, including issues, merge requests etc."
msgstr "" msgstr ""
msgid "Once a project is permanently deleted, it cannot be recovered. You will lose this project's repository and all related resources, including issues, merge requests etc." msgid "Once a project is permanently deleted, it cannot be recovered. You will lose this project's repository and all related resources, including issues and merge requests."
msgstr "" msgstr ""
msgid "Once imported, repositories can be mirrored over SSH. Read more %{link_start}here%{link_end}." msgid "Once imported, repositories can be mirrored over SSH. Read more %{link_start}here%{link_end}."
@ -23120,7 +23120,7 @@ msgstr ""
msgid "Only Project Members" msgid "Only Project Members"
msgstr "" msgstr ""
msgid "Only active this projects shows up in the search and on the dashboard." msgid "Only active projects show up in the search and on the dashboard."
msgstr "" msgstr ""
msgid "Only admins can delete project" msgid "Only admins can delete project"
@ -23969,6 +23969,9 @@ msgstr ""
msgid "PerformanceBar|Trace" msgid "PerformanceBar|Trace"
msgstr "" msgstr ""
msgid "Permanently delete project"
msgstr ""
msgid "Permissions" msgid "Permissions"
msgstr "" msgstr ""
@ -33450,16 +33453,13 @@ msgstr ""
msgid "This action cannot be undone, and will permanently delete the %{key} SSH key" msgid "This action cannot be undone, and will permanently delete the %{key} SSH key"
msgstr "" msgstr ""
msgid "This action cannot be undone. You will lose this project's repository and all related resources, including issues, merge requests, etc."
msgstr ""
msgid "This action has been performed too many times. Try again later." msgid "This action has been performed too many times. Try again later."
msgstr "" msgstr ""
msgid "This action will %{strongOpen}permanently delete%{strongClose} %{codeOpen}%{project}%{codeClose} %{strongOpen}immediately%{strongClose}, including its repositories and all related resources, including issues, merge requests, etc." msgid "This action will %{strongOpen}permanently delete%{strongClose} %{codeOpen}%{project}%{codeClose} %{strongOpen}immediately%{strongClose}, including its repositories and all related resources, including issues and merge requests."
msgstr "" msgstr ""
msgid "This action will %{strongOpen}permanently delete%{strongClose} %{codeOpen}%{project}%{codeClose} %{strongOpen}on %{date}%{strongClose}, including its repositories and all related resources, including issues, merge requests, etc." msgid "This action will %{strongOpen}permanently delete%{strongClose} %{codeOpen}%{project}%{codeClose} %{strongOpen}on %{date}%{strongClose}, including its repositories and all related resources, including issues and merge requests."
msgstr "" msgstr ""
msgid "This also resolves all related threads" msgid "This also resolves all related threads"

View File

@ -256,7 +256,7 @@ RSpec.describe 'Project' do
expect(page).to have_selector '#confirm_name_input:focus' expect(page).to have_selector '#confirm_name_input:focus'
end end
it 'deletes a project', :sidekiq_might_not_need_inline do it 'deletes a project', :sidekiq_inline do
expect { remove_with_confirm('Delete project', project.path, 'Yes, delete project') }.to change { Project.count }.by(-1) expect { remove_with_confirm('Delete project', project.path, 'Yes, delete project') }.to change { Project.count }.by(-1)
expect(page).to have_content "Project '#{project.full_name}' is in the process of being deleted." expect(page).to have_content "Project '#{project.full_name}' is in the process of being deleted."
expect(Project.all.count).to be_zero expect(Project.all.count).to be_zero

View File

@ -57,10 +57,6 @@ exports[`Project remove modal initialized matches the snapshot 1`] = `
/> />
</gl-alert-stub> </gl-alert-stub>
<p>
This action cannot be undone. You will lose this project's repository and all related resources, including issues, merge requests, etc.
</p>
<p <p
class="gl-mb-1" class="gl-mb-1"
> >