Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
477c7a6cc1
commit
ba689154ab
21 changed files with 292 additions and 46 deletions
|
@ -1 +1 @@
|
|||
86aa7ee82a5dd241fd7d4b33435da0a7ecad12b0
|
||||
2e30abfa61112d353f2474ab41837882b78e5d1a
|
||||
|
|
|
@ -98,6 +98,14 @@ class Dashboard::TodosController < Dashboard::ApplicationController
|
|||
end
|
||||
|
||||
def todo_params
|
||||
params.permit(:action_id, :author_id, :project_id, :type, :sort, :state, :group_id)
|
||||
aliased_action_id(
|
||||
params.permit(:action_id, :author_id, :project_id, :type, :sort, :state, :group_id)
|
||||
)
|
||||
end
|
||||
|
||||
def aliased_action_id(original_params)
|
||||
return original_params unless original_params[:action_id].to_i == ::Todo::MENTIONED
|
||||
|
||||
original_params.merge(action_id: [::Todo::MENTIONED, ::Todo::DIRECTLY_ADDRESSED])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,12 +17,11 @@ module TodosHelper
|
|||
case todo.action
|
||||
when Todo::ASSIGNED then todo.self_added? ? 'assigned' : 'assigned you'
|
||||
when Todo::REVIEW_REQUESTED then 'requested a review of'
|
||||
when Todo::MENTIONED then "mentioned #{todo_action_subject(todo)} on"
|
||||
when Todo::MENTIONED, Todo::DIRECTLY_ADDRESSED then "mentioned #{todo_action_subject(todo)} on"
|
||||
when Todo::BUILD_FAILED then 'The pipeline failed in'
|
||||
when Todo::MARKED then 'added a todo for'
|
||||
when Todo::APPROVAL_REQUIRED then "set #{todo_action_subject(todo)} as an approver for"
|
||||
when Todo::UNMERGEABLE then 'Could not merge'
|
||||
when Todo::DIRECTLY_ADDRESSED then "directly addressed #{todo_action_subject(todo)} on"
|
||||
when Todo::MERGE_TRAIN_REMOVED then "Removed from Merge Train:"
|
||||
when Todo::ATTENTION_REQUESTED then 'requested your attention on'
|
||||
end
|
||||
|
@ -151,8 +150,7 @@ module TodosHelper
|
|||
{ id: Todo::REVIEW_REQUESTED, text: 'Review requested' },
|
||||
{ id: Todo::MENTIONED, text: 'Mentioned' },
|
||||
{ id: Todo::MARKED, text: 'Added' },
|
||||
{ id: Todo::BUILD_FAILED, text: 'Pipelines' },
|
||||
{ id: Todo::DIRECTLY_ADDRESSED, text: 'Directly addressed' }
|
||||
{ id: Todo::BUILD_FAILED, text: 'Pipelines' }
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -68,6 +68,20 @@ module Emails
|
|||
mail(to: user.notification_email_for(@project.group), subject: subject(subject_text))
|
||||
end
|
||||
|
||||
def inactive_project_deletion_warning_email(project, user, deletion_date)
|
||||
@project = project
|
||||
@user = user
|
||||
@deletion_date = deletion_date
|
||||
subject_text = "Action required: Project #{project.name} is scheduled to be deleted on " \
|
||||
"#{deletion_date} due to inactivity"
|
||||
|
||||
mail(to: user.notification_email_for(project.group),
|
||||
subject: subject(subject_text)) do |format|
|
||||
format.html { render layout: 'mailer' }
|
||||
format.text { render layout: 'mailer' }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_alert_headers
|
||||
|
|
|
@ -201,6 +201,10 @@ class NotifyPreview < ActionMailer::Preview
|
|||
Notify.merge_when_pipeline_succeeds_email(user.id, merge_request.id, user.id).message
|
||||
end
|
||||
|
||||
def inactive_project_deletion_warning
|
||||
Notify.inactive_project_deletion_warning_email(project, user, '2022-04-22').message
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def project
|
||||
|
|
|
@ -769,6 +769,12 @@ class NotificationService
|
|||
unapprove_mr_email(merge_request, merge_request.target_project, current_user)
|
||||
end
|
||||
|
||||
def inactive_project_deletion_warning(project, deletion_date)
|
||||
owners_and_maintainers_without_invites(project).each do |recipient|
|
||||
mailer.inactive_project_deletion_warning_email(project, recipient.user, deletion_date).deliver_later
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def new_resource_email(target, current_user, method)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
- project_link = link_to(_("%{project_name}") % { project_name: @project.name }, @project.http_url_to_repo)
|
||||
- projects_api_link = link_to(_("Projects API"), help_page_url('api/projects'))
|
||||
- events_api_link = link_to(_("Events API"), help_page_url('api/events', anchor: 'list-a-projects-visible-events'))
|
||||
|
||||
%p
|
||||
= _('Hi %{username},') % { username: sanitize_name(@user.name) }
|
||||
|
||||
%p
|
||||
= html_escape(_("Due to inactivity, the %{project_link} project is scheduled to be deleted on %{b_open}%{deletion_date}%{b_close}. To unschedule the deletion of %{project_link}, perform some activity on it. For example:")) % { project_link: project_link.html_safe, deletion_date: @deletion_date, b_open: '<b>'.html_safe, b_close: '</b>'.html_safe }
|
||||
|
||||
%p
|
||||
%ul
|
||||
%li= _("Create or close an issue.")
|
||||
%li= _("Create, update, or delete a merge request.")
|
||||
%li= _("Push code to the repository.")
|
||||
%li= _("Add or remove a user.")
|
||||
|
||||
%p
|
||||
= html_escape(_("To ensure %{project_link} is unscheduled for deletion, check that activity has been logged by GitLab. For example:")) %{project_link: project_link.html_safe}
|
||||
|
||||
%p
|
||||
%ul
|
||||
%li= html_escape(_("Go to the %{b_open}Activity%{b_close} page for %{project_link}.")) % { project_link: project_link, b_open: '<b>'.html_safe, b_close: '</b>'.html_safe }
|
||||
%li= html_escape(_("View the %{code_open}last_activity_at%{code_close} attribute for %{project_link} using the %{projects_api_link}.")) % { project_link: project_link.html_safe, projects_api_link: projects_api_link.html_safe, code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
|
||||
%li= html_escape(_("List the visible events for %{project_link} using the %{events_api_link}.")) % { project_link: project_link.html_safe, events_api_link: events_api_link.html_safe }
|
||||
|
||||
%p
|
||||
= html_escape(_("This email supersedes any previous emails about scheduled deletion you may have received for %{project_link}.")) % { project_link: project_link.html_safe }
|
|
@ -0,0 +1,17 @@
|
|||
<%= _('Hi %{username},') % { username: sanitize_name(@user.name) } %>
|
||||
|
||||
<%= _("Due to inactivity, the %{project_name} (%{project_link}) project is scheduled to be deleted on %{deletion_date}. To unschedule the deletion of %{project_name}, perform some activity on it. For example:") %
|
||||
{ project_name: @project.name, project_link: @project.http_url_to_repo, deletion_date: @deletion_date } %>
|
||||
|
||||
<%= _("- Create or close an issue.") %>
|
||||
<%= _("- Create, update, or delete a merge request.") %>
|
||||
<%= _("- Push code to the repository.") %>
|
||||
<%= _("- Add or remove a user.") %>
|
||||
|
||||
<%= _("To ensure %{project_name} is unscheduled for deletion, check that activity has been logged by GitLab. For example:") % { project_name: @project.name } %>
|
||||
|
||||
<%= _("- Go to the Activity page for %{project_name}.") % { project_name: @project.name } %>
|
||||
<%= _("- View the last_activity_at attribute for %{project_name} using the Project API %{projects_api_link}.") % { project_name: @project.name, projects_api_link: help_page_url('api/projects') } %>
|
||||
<%= _("- List the visible events for %{project_name} using the Events API %{events_api_link}.") % { project_name: @project.name, events_api_link: help_page_url('api/events', anchor: 'list-a-projects-visible-events') } %>
|
||||
|
||||
<%= _("This email supersedes any previous emails about scheduled deletion you may have received for %{project_name}.") % { project_name: @project.name } %>
|
|
@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/343429
|
|||
milestone: '14.5'
|
||||
type: development
|
||||
group: group::optimize
|
||||
default_enabled: false
|
||||
default_enabled: true
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ToggleVsaAggregationsEnable < Gitlab::Database::Migration[2.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main
|
||||
|
||||
def up
|
||||
model = define_batchable_model('analytics_cycle_analytics_aggregations')
|
||||
|
||||
model.each_batch(of: 100) do |relation|
|
||||
relation.where('enabled IS FALSE').update_all(enabled: true)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
# noop
|
||||
end
|
||||
end
|
1
db/schema_migrations/20220405092619
Normal file
1
db/schema_migrations/20220405092619
Normal file
|
@ -0,0 +1 @@
|
|||
c5cd7bd6ad1dff678aaa2eea89dde757cdbc159cecc8abc5d098e9ce91d55c40
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
|
@ -45,9 +45,6 @@ To view value stream analytics for your group:
|
|||
1. Select the **Filter results** text box.
|
||||
1. Select a parameter.
|
||||
1. Select a value or enter text to refine the results.
|
||||
1. Select whether to view metrics for items with a start or stop event:
|
||||
- To view items with a stop event in the date range, turn on the **Filter by stop date** toggle. Enabled by default.
|
||||
- To view items with a start event in the date range, turn off the **Filter by stop date** toggle.
|
||||
1. To adjust the date range:
|
||||
- In the **From** field, select a start date.
|
||||
- In the **To** field, select an end date. The charts and list show workflow items created
|
||||
|
@ -82,9 +79,6 @@ To view the median time spent in each stage by a group:
|
|||
1. Select the **Filter results** text box.
|
||||
1. Select a parameter.
|
||||
1. Select a value or enter text to refine the results.
|
||||
1. Select whether to view metrics for items with a start or stop event:
|
||||
- To view items with a stop event in the date range, turn on the **Filter by stop date** toggle. Enabled by default.
|
||||
- To view items with a start event in the date range, turn off the **Filter by stop date** toggle.
|
||||
1. To adjust the date range:
|
||||
- In the **From** field, select a start date.
|
||||
- In the **To** field, select an end date.
|
||||
|
@ -108,9 +102,6 @@ To view the lead time and cycle time for issues:
|
|||
1. Select the **Filter results** text box.
|
||||
1. Select a parameter.
|
||||
1. Select a value or enter text to refine the results.
|
||||
1. Select whether to view metrics for items with a start or stop event:
|
||||
- To view items with a stop event in the date range, turn on the **Filter by stop date** toggle. Enabled by default.
|
||||
- To view items with a start event in the date range, turn off the **Filter by stop date** toggle.
|
||||
1. To adjust the date range:
|
||||
- In the **From** field, select a start date.
|
||||
- In the **To** field, select an end date.
|
||||
|
@ -131,9 +122,6 @@ To view the lead time for changes for merge requests in your group:
|
|||
1. Select the **Filter results** text box.
|
||||
1. Select a parameter.
|
||||
1. Select a value or enter text to refine the results.
|
||||
1. Select whether to view metrics for items with a start or stop event:
|
||||
- To view items with a stop event in the date range, turn on the **Filter by stop date** toggle. Enabled by default.
|
||||
- To view items with a start event in the date range, turn off the **Filter by stop date** toggle.
|
||||
1. To adjust the date range:
|
||||
- In the **From** field, select a start date.
|
||||
- In the **To** field, select an end date.
|
||||
|
@ -160,13 +148,14 @@ To view deployment metrics for your group:
|
|||
1. Select the **Filter results** text box.
|
||||
1. Select a parameter.
|
||||
1. Select a value or enter text to refine the results.
|
||||
1. Select whether to view metrics for items with a start or stop event:
|
||||
- To view items with a stop event in the date range, turn on the **Filter by stop date** toggle. Enabled by default.
|
||||
- To view items with a start event in the date range, turn off the **Filter by stop date** toggle.
|
||||
1. To adjust the date range:
|
||||
- In the **From** field, select a start date.
|
||||
- In the **To** field, select an end date.
|
||||
|
||||
NOTE:
|
||||
The date range selector filters items by the event time. This is the time when the currently
|
||||
selected stage finished for the given item.
|
||||
|
||||
The **Deploys** and **Deployment Frequency** metrics display below the **Filter results** text box.
|
||||
|
||||
Deployment metrics are calculated based on data from the
|
||||
|
@ -181,19 +170,22 @@ In GitLab 13.8 and earlier, metrics are calculated based on when the deployment
|
|||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335391) in GitLab 14.5 [with a flag](../../../administration/feature_flags.md) named `use_vsa_aggregated_tables`. Disabled by default.
|
||||
> - Filter by stop date toggle [added](https://gitlab.com/gitlab-org/gitlab/-/issues/352428) in GitLab 14.9
|
||||
> - Data refresh badge [added](https://gitlab.com/gitlab-org/gitlab/-/issues/341739) in GitLab 14.9
|
||||
> - Filter by stop date toggle [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84356) in GitLab 14.9
|
||||
> - Enable filtering by stop date [added](https://gitlab.com/gitlab-org/gitlab/-/issues/355000) in GitLab 15.0
|
||||
|
||||
Plans for value stream analytics to filter items by stop event instead of start event are tracked in this [epic](https://gitlab.com/groups/gitlab-org/-/epics/6046). With the completion of this work, value stream analytics will only display items with a stop event in the date range.
|
||||
Value stream analytics uses a backend process to collect and aggregate stage-level data, which
|
||||
ensures it can scale for large groups with a high number of issues and merge requests. Due to this process,
|
||||
there may be a slight delay between when an action is taken (for example, closing an issue) and when the data
|
||||
displays on the value stream analytics page.
|
||||
|
||||
To preview this functionality, you can use the **Filter by stop date** toggle to enable or disable this filter until the [default filtering mode is introduced](../../../update/deprecations.md#value-stream-analytics-filtering-calculation-change) and the toggle is removed.
|
||||
|
||||
If you turn on the **Filter by stop date** toggle, the results show items with a stop event within the date range. When this function is enabled, it may take up to 10 minutes for results to show due to data aggregation. There are occasions when it may take longer than 10 minutes for results to display:
|
||||
It may take up to 10 minutes to process the data and display results. Data collection may take
|
||||
longer than 10 minutes in the following cases:
|
||||
|
||||
- If this is the first time you are viewing value stream analytics and have not yet [created a value stream](#create-a-value-stream-with-gitlab-default-stages).
|
||||
- If the group hierarchy has been re-arranged.
|
||||
- If there have been bulk updates on issues and merge requests.
|
||||
|
||||
To view when the data was most recently updated, in the right corner next to **Edit**, hover over the **Last updated** badge. This badge is only available if you have turned on the **Filter by start date** toggle.
|
||||
![Aggregated data toggle](img/vsa_aggregated_data_toggle_v14_9.png "Aggregated data toggle")
|
||||
To view when the data was most recently updated, in the right corner next to **Edit**, hover over the **Last updated** badge.
|
||||
|
||||
## How value stream analytics measures stages
|
||||
|
||||
|
|
|
@ -84,28 +84,25 @@ You can manually add an item to your To-Do List.
|
|||
|
||||
![Adding a to-do item from the issuable sidebar](img/todos_add_todo_sidebar_v14_1.png)
|
||||
|
||||
## Create a to-do item by directly addressing someone
|
||||
## Create a to-do item by mentioning someone
|
||||
|
||||
You can create a to-do item by directly addressing someone at the start of a line.
|
||||
For example, in the following comment:
|
||||
You can create a to-do item by mentioning someone anywhere except for a code block. Mentioning a user many times in one message only creates one to-do item.
|
||||
|
||||
```markdown
|
||||
For example, from the following comment, everyone except `frank` gets a to-do item created for them:
|
||||
|
||||
````markdown
|
||||
@alice What do you think? cc: @bob
|
||||
|
||||
- @carol can you please have a look?
|
||||
|
||||
> @dan what do you think?
|
||||
|
||||
@erin @frank thank you!
|
||||
Hey @erin, this is what they said:
|
||||
|
||||
```
|
||||
|
||||
The people who receive to-do items are `@alice`, `@erin`, and
|
||||
`@frank`.
|
||||
|
||||
To view to-do items where a user was directly addressed, go to the To-Do List and
|
||||
from the **Action** filter, select **Directly addressed**.
|
||||
|
||||
Mentioning a user many times only creates one to-do item.
|
||||
Hi, please message @frank :incoming_envelope:
|
||||
```
|
||||
````
|
||||
|
||||
## Actions that mark a to-do item as done
|
||||
|
||||
|
|
|
@ -218,3 +218,10 @@
|
|||
redis_slot: project_management
|
||||
aggregation: daily
|
||||
feature_flag: track_epics_activity
|
||||
|
||||
- name: g_project_management_epic_blocked_removed
|
||||
category: epics_usage
|
||||
redis_slot: project_management
|
||||
aggregation: daily
|
||||
feature_flag: track_epics_activity
|
||||
|
||||
|
|
|
@ -883,6 +883,9 @@ msgstr ""
|
|||
msgid "%{policy_link} (notifying after %{elapsed_time} minutes unless %{status})"
|
||||
msgstr ""
|
||||
|
||||
msgid "%{project_name}"
|
||||
msgstr ""
|
||||
|
||||
msgid "%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1277,17 +1280,35 @@ msgstr ""
|
|||
msgid "- %{policy_name} (notifying after %{elapsed_time} minutes unless %{status})"
|
||||
msgstr ""
|
||||
|
||||
msgid "- Add or remove a user."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Available to run jobs."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Create or close an issue."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Create, update, or delete a merge request."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Event"
|
||||
msgid_plural "- Events"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "- Go to the Activity page for %{project_name}."
|
||||
msgstr ""
|
||||
|
||||
msgid "- List the visible events for %{project_name} using the Events API %{events_api_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Not available to run jobs."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Push code to the repository."
|
||||
msgstr ""
|
||||
|
||||
msgid "- Select -"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1296,6 +1317,9 @@ msgid_plural "- Users"
|
|||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "- View the last_activity_at attribute for %{project_name} using the Project API %{projects_api_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "- of - issues closed"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2212,6 +2236,9 @@ msgstr ""
|
|||
msgid "Add new directory"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove a user."
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove previously merged commits"
|
||||
msgstr ""
|
||||
|
||||
|
@ -10427,6 +10454,9 @@ msgstr ""
|
|||
msgid "Create one"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create or close an issue."
|
||||
msgstr ""
|
||||
|
||||
msgid "Create or import your first project"
|
||||
msgstr ""
|
||||
|
||||
|
@ -10466,6 +10496,9 @@ msgstr ""
|
|||
msgid "Create your group"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create, update, or delete a merge request."
|
||||
msgstr ""
|
||||
|
||||
msgid "Create/import your first project"
|
||||
msgstr ""
|
||||
|
||||
|
@ -13373,6 +13406,12 @@ msgstr ""
|
|||
msgid "Due date"
|
||||
msgstr ""
|
||||
|
||||
msgid "Due to inactivity, the %{project_link} project is scheduled to be deleted on %{b_open}%{deletion_date}%{b_close}. To unschedule the deletion of %{project_link}, perform some activity on it. For example:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Due to inactivity, the %{project_name} (%{project_link}) project is scheduled to be deleted on %{deletion_date}. To unschedule the deletion of %{project_name}, perform some activity on it. For example:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Duplicate page: %{error_message}"
|
||||
msgstr ""
|
||||
|
||||
|
@ -14888,6 +14927,9 @@ msgstr ""
|
|||
msgid "Events"
|
||||
msgstr ""
|
||||
|
||||
msgid "Events API"
|
||||
msgstr ""
|
||||
|
||||
msgid "Every %{action} attempt has failed: %{job_error_message}. Please try again."
|
||||
msgstr ""
|
||||
|
||||
|
@ -17394,6 +17436,9 @@ msgstr ""
|
|||
msgid "Go to snippets"
|
||||
msgstr ""
|
||||
|
||||
msgid "Go to the %{b_open}Activity%{b_close} page for %{project_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Go to the 'Admin area > Sign-up restrictions', and check 'Allowed domains for sign-ups'."
|
||||
msgstr ""
|
||||
|
||||
|
@ -18601,6 +18646,9 @@ msgstr ""
|
|||
msgid "Hi %{username}!"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hi %{username},"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr ""
|
||||
|
||||
|
@ -22793,6 +22841,9 @@ msgstr ""
|
|||
msgid "List the merge requests that must be merged before this one."
|
||||
msgstr ""
|
||||
|
||||
msgid "List the visible events for %{project_link} using the %{events_api_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "List view"
|
||||
msgstr ""
|
||||
|
||||
|
@ -29944,6 +29995,9 @@ msgstr ""
|
|||
msgid "Projects (%{count})"
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects API"
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects Successfully Retrieved"
|
||||
msgstr ""
|
||||
|
||||
|
@ -30661,6 +30715,9 @@ msgstr ""
|
|||
msgid "Push an existing folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push code to the repository."
|
||||
msgstr ""
|
||||
|
||||
msgid "Push commits to the source branch or add previously merged commits to review them."
|
||||
msgstr ""
|
||||
|
||||
|
@ -38397,6 +38454,12 @@ msgstr ""
|
|||
msgid "This domain is not verified. You will need to verify ownership before access is enabled."
|
||||
msgstr ""
|
||||
|
||||
msgid "This email supersedes any previous emails about scheduled deletion you may have received for %{project_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "This email supersedes any previous emails about scheduled deletion you may have received for %{project_name}."
|
||||
msgstr ""
|
||||
|
||||
msgid "This endpoint has been requested too many times. Try again later."
|
||||
msgstr ""
|
||||
|
||||
|
@ -39241,6 +39304,12 @@ msgstr ""
|
|||
msgid "To enable Registration Features, first enable Service Ping."
|
||||
msgstr ""
|
||||
|
||||
msgid "To ensure %{project_link} is unscheduled for deletion, check that activity has been logged by GitLab. For example:"
|
||||
msgstr ""
|
||||
|
||||
msgid "To ensure %{project_name} is unscheduled for deletion, check that activity has been logged by GitLab. For example:"
|
||||
msgstr ""
|
||||
|
||||
msgid "To ensure no loss of personal content, this account should only be used for matters related to %{group_name}."
|
||||
msgstr ""
|
||||
|
||||
|
@ -41242,9 +41311,6 @@ msgstr ""
|
|||
msgid "ValueStreamAnalytics|Go to docs"
|
||||
msgstr ""
|
||||
|
||||
msgid "ValueStreamAnalytics|Items in Value Stream Analytics are currently filtered by their creation time. There is an %{epic_link_start}epic%{epic_link_end} that will change the Value Stream Analytics date filter to use the end event time for the selected stage."
|
||||
msgstr ""
|
||||
|
||||
msgid "ValueStreamAnalytics|Key metrics"
|
||||
msgstr ""
|
||||
|
||||
|
@ -41518,6 +41584,9 @@ msgstr ""
|
|||
msgid "View supported languages and frameworks"
|
||||
msgstr ""
|
||||
|
||||
msgid "View the %{code_open}last_activity_at%{code_close} attribute for %{project_link} using the %{projects_api_link}."
|
||||
msgstr ""
|
||||
|
||||
msgid "View the documentation"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -113,6 +113,19 @@ RSpec.describe Dashboard::TodosController do
|
|||
|
||||
expect(response).to redirect_to(dashboard_todos_path(page: last_page, project_id: project.id))
|
||||
end
|
||||
|
||||
it 'returns directly addressed if filtering by mentioned action_id' do
|
||||
allow(controller).to receive(:current_user).and_return(user)
|
||||
|
||||
mentioned_todos = [
|
||||
create(:todo, :directly_addressed, project: project, user: user, target: issues.first),
|
||||
create(:todo, :mentioned, project: project, user: user, target: issues.first)
|
||||
]
|
||||
|
||||
get :index, params: { action_id: ::Todo::MENTIONED, project_id: project.id }
|
||||
|
||||
expect(assigns(:todos)).to match_array(mentioned_todos)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -211,9 +211,9 @@ RSpec.describe 'Dashboard Todos' do
|
|||
visit dashboard_todos_path
|
||||
end
|
||||
|
||||
it 'shows you directly addressed yourself message' do
|
||||
it 'shows you directly addressed yourself message being displayed as mentioned yourself' do
|
||||
page.within('.js-todos-all') do
|
||||
expect(page).to have_content("You directly addressed yourself on issue #{issue.to_reference} \"Fix bug\" at #{project.namespace.owner_name} / #{project.name}")
|
||||
expect(page).to have_content("You mentioned yourself on issue #{issue.to_reference} \"Fix bug\" at #{project.namespace.owner_name} / #{project.name}")
|
||||
expect(page).not_to have_content('to yourself')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -180,4 +180,32 @@ RSpec.describe Emails::Projects do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '.inactive_project_deletion_warning_email' do
|
||||
let(:recipient) { user }
|
||||
let(:deletion_date) { "2022-01-10" }
|
||||
|
||||
subject { Notify.inactive_project_deletion_warning_email(project, user, deletion_date) }
|
||||
|
||||
it_behaves_like 'an email sent to a user'
|
||||
it_behaves_like 'an email sent from GitLab'
|
||||
it_behaves_like 'it should not have Gmail Actions links'
|
||||
it_behaves_like 'a user cannot unsubscribe through footer link'
|
||||
it_behaves_like 'appearance header and footer enabled'
|
||||
it_behaves_like 'appearance header and footer not enabled'
|
||||
|
||||
it 'has the correct subject and body' do
|
||||
project_link = "<a href=\"#{project.http_url_to_repo}\">#{project.name}</a>"
|
||||
|
||||
is_expected.to have_subject("#{project.name} | Action required: Project #{project.name} is scheduled to be " \
|
||||
"deleted on 2022-01-10 due to inactivity")
|
||||
is_expected.to have_body_text(project.http_url_to_repo)
|
||||
is_expected.to have_body_text("Due to inactivity, the #{project_link} project is scheduled to be deleted " \
|
||||
"on <b>2022-01-10</b>")
|
||||
is_expected.to have_body_text("To ensure #{project_link} is unscheduled for deletion, check that activity has " \
|
||||
"been logged by GitLab")
|
||||
is_expected.to have_body_text("This email supersedes any previous emails about scheduled deletion you may " \
|
||||
"have received for #{project_link}.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
25
spec/migrations/toggle_vsa_aggregations_enable_spec.rb
Normal file
25
spec/migrations/toggle_vsa_aggregations_enable_spec.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require_migration!
|
||||
|
||||
RSpec.describe ToggleVsaAggregationsEnable, :migration do
|
||||
let(:aggregations) { table(:analytics_cycle_analytics_aggregations) }
|
||||
let(:groups) { table(:namespaces) }
|
||||
|
||||
let!(:group1) { groups.create!(name: 'aaa', path: 'aaa') }
|
||||
let!(:group2) { groups.create!(name: 'aaa', path: 'aaa') }
|
||||
let!(:group3) { groups.create!(name: 'aaa', path: 'aaa') }
|
||||
|
||||
let!(:aggregation1) { aggregations.create!(group_id: group1.id, enabled: false) }
|
||||
let!(:aggregation2) { aggregations.create!(group_id: group2.id, enabled: true) }
|
||||
let!(:aggregation3) { aggregations.create!(group_id: group3.id, enabled: false) }
|
||||
|
||||
it 'makes all aggregations enabled' do
|
||||
migrate!
|
||||
|
||||
expect(aggregation1.reload).to be_enabled
|
||||
expect(aggregation2.reload).to be_enabled
|
||||
expect(aggregation3.reload).to be_enabled
|
||||
end
|
||||
end
|
|
@ -3708,6 +3708,26 @@ RSpec.describe NotificationService, :mailer do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#inactive_project_deletion_warning' do
|
||||
let_it_be(:deletion_date) { Date.current }
|
||||
let_it_be(:project) { create(:project) }
|
||||
let_it_be(:maintainer) { create(:user) }
|
||||
let_it_be(:developer) { create(:user) }
|
||||
|
||||
before do
|
||||
project.add_maintainer(maintainer)
|
||||
end
|
||||
|
||||
subject { notification.inactive_project_deletion_warning(project, deletion_date) }
|
||||
|
||||
it "sends email to project owners and maintainers" do
|
||||
expect { subject }.to have_enqueued_email(project, maintainer, deletion_date,
|
||||
mail: "inactive_project_deletion_warning_email")
|
||||
expect { subject }.not_to have_enqueued_email(project, developer, deletion_date,
|
||||
mail: "inactive_project_deletion_warning_email")
|
||||
end
|
||||
end
|
||||
|
||||
def build_team(project)
|
||||
@u_watcher = create_global_setting_for(create(:user), :watch)
|
||||
@u_participating = create_global_setting_for(create(:user), :participating)
|
||||
|
|
Loading…
Reference in a new issue