Commit 87ab5433 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 048cc0c1 73cbbb91
...@@ -182,8 +182,6 @@ Rails/SaveBang: ...@@ -182,8 +182,6 @@ Rails/SaveBang:
- 'spec/controllers/groups/runners_controller_spec.rb' - 'spec/controllers/groups/runners_controller_spec.rb'
- 'spec/controllers/groups/uploads_controller_spec.rb' - 'spec/controllers/groups/uploads_controller_spec.rb'
- 'spec/controllers/groups_controller_spec.rb' - 'spec/controllers/groups_controller_spec.rb'
- 'spec/controllers/oauth/authorizations_controller_spec.rb'
- 'spec/controllers/omniauth_callbacks_controller_spec.rb'
- 'spec/controllers/profiles/emails_controller_spec.rb' - 'spec/controllers/profiles/emails_controller_spec.rb'
- 'spec/controllers/profiles/notifications_controller_spec.rb' - 'spec/controllers/profiles/notifications_controller_spec.rb'
- 'spec/controllers/projects_controller_spec.rb' - 'spec/controllers/projects_controller_spec.rb'
......
<script> <script>
import { GlButton, GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui'; import { GlButton, GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import ApplySuggestion from './apply_suggestion.vue'; import ApplySuggestion from './apply_suggestion.vue';
export default { export default {
components: { GlIcon, GlButton, GlLoadingIcon, ApplySuggestion }, components: { GlIcon, GlButton, GlLoadingIcon, ApplySuggestion },
directives: { 'gl-tooltip': GlTooltipDirective }, directives: { 'gl-tooltip': GlTooltipDirective },
mixins: [glFeatureFlagsMixin()],
props: { props: {
batchSuggestionsCount: { batchSuggestionsCount: {
type: Number, type: Number,
...@@ -59,9 +57,6 @@ export default { ...@@ -59,9 +57,6 @@ export default {
}; };
}, },
computed: { computed: {
canBeBatched() {
return Boolean(this.glFeatures.batchSuggestions);
},
isApplying() { isApplying() {
return this.isApplyingSingle || this.isApplyingBatch; return this.isApplyingSingle || this.isApplyingBatch;
}, },
...@@ -118,7 +113,7 @@ export default { ...@@ -118,7 +113,7 @@ export default {
<gl-loading-icon class="d-flex-center mr-2" /> <gl-loading-icon class="d-flex-center mr-2" />
<span>{{ applyingSuggestionsMessage }}</span> <span>{{ applyingSuggestionsMessage }}</span>
</div> </div>
<div v-else-if="canApply && canBeBatched && isBatched" class="d-flex align-items-center"> <div v-else-if="canApply && isBatched" class="d-flex align-items-center">
<gl-button <gl-button
class="btn-inverted js-remove-from-batch-btn btn-grouped" class="btn-inverted js-remove-from-batch-btn btn-grouped"
:disabled="isApplying" :disabled="isApplying"
...@@ -142,7 +137,7 @@ export default { ...@@ -142,7 +137,7 @@ export default {
</div> </div>
<div v-else class="d-flex align-items-center"> <div v-else class="d-flex align-items-center">
<gl-button <gl-button
v-if="suggestionsCount > 1 && canBeBatched && !isDisableButton" v-if="suggestionsCount > 1 && !isDisableButton"
class="btn-inverted js-add-to-batch-btn btn-grouped" class="btn-inverted js-add-to-batch-btn btn-grouped"
data-qa-selector="add_suggestion_batch_button" data-qa-selector="add_suggestion_batch_button"
:disabled="isDisableButton" :disabled="isDisableButton"
......
...@@ -30,7 +30,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -30,7 +30,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action :check_user_can_push_to_source_branch!, only: [:rebase] before_action :check_user_can_push_to_source_branch!, only: [:rebase]
before_action only: [:show] do before_action only: [:show] do
push_frontend_feature_flag(:file_identifier_hash) push_frontend_feature_flag(:file_identifier_hash)
push_frontend_feature_flag(:batch_suggestions, @project, default_enabled: true)
push_frontend_feature_flag(:approvals_commented_by, @project, default_enabled: true) push_frontend_feature_flag(:approvals_commented_by, @project, default_enabled: true)
push_frontend_feature_flag(:merge_request_widget_graphql, @project, default_enabled: :yaml) push_frontend_feature_flag(:merge_request_widget_graphql, @project, default_enabled: :yaml)
push_frontend_feature_flag(:drag_comment_selection, @project, default_enabled: true) push_frontend_feature_flag(:drag_comment_selection, @project, default_enabled: true)
......
...@@ -29,7 +29,6 @@ class JenkinsService < CiService ...@@ -29,7 +29,6 @@ class JenkinsService < CiService
end end
def execute(data) def execute(data)
return if project.disabled_services.include?(to_param)
return unless supported_events.include?(data[:object_kind]) return unless supported_events.include?(data[:object_kind])
service_hook.execute(data, "#{data[:object_kind]}_hook") service_hook.execute(data, "#{data[:object_kind]}_hook")
......
---
title: Remove batch_suggestions feature flag
merge_request: 57745
author:
type: other
---
title: Fix Rails/SaveBang rubocop offenses in auth controllers
merge_request: 57886
author: Abdul Wadood @abdulwd
type: fixed
---
name: batch_suggestions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34782
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/320755
milestone: '13.1'
type: development
group: group::code review
default_enabled: true
...@@ -10124,6 +10124,54 @@ Status: `implemented` ...@@ -10124,6 +10124,54 @@ Status: `implemented`
Tiers: `premium`, `ultimate` Tiers: `premium`, `ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_due_date_monthly`
Counts of MAU manually updating fixed due date
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210329043548_g_project_management_users_updating_fixed_epic_due_date_monthly.yml)
Group: `group::product planning`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_due_date_weekly`
Counts of WAU manually updating fixed due date
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210329042536_g_project_management_users_updating_fixed_epic_due_date_weekly.yml)
Group: `group::product planning`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_start_date_monthly`
Counts of MAU manually updating fixed start date
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210329043509_g_project_management_users_updating_fixed_epic_start_date_monthly.yml)
Group: `group::product planning`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_start_date_weekly`
Counts of WAU manually updating fixed start date
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210329043402_g_project_management_users_updating_fixed_epic_start_date_weekly.yml)
Group: `group::product planning`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `redis_hll_counters.ide_edit.g_edit_by_sfe_monthly` ### `redis_hll_counters.ide_edit.g_edit_by_sfe_monthly`
Missing description Missing description
......
...@@ -486,11 +486,9 @@ introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381). ...@@ -486,11 +486,9 @@ introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381).
### Batch Suggestions ### Batch Suggestions
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [alpha feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha). > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [alpha feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha) behind a feature flag, disabled by default.
> - Deployed behind a feature flag, disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2. > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2.
> - Enabled on GitLab.com. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/320755) in GitLab 13.11.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-batch-suggestions).
You can apply multiple suggestions at once to reduce the number of commits added You can apply multiple suggestions at once to reduce the number of commits added
to your branch to address your reviewers' requests. to your branch to address your reviewers' requests.
...@@ -540,7 +538,7 @@ You can assign an issue to a user who made a comment. ...@@ -540,7 +538,7 @@ You can assign an issue to a user who made a comment.
In the comment, click the **More Actions** menu and click **Assign to commenting user**. In the comment, click the **More Actions** menu and click **Assign to commenting user**.
Click the button again to unassign the commenter. Click the button again to unassign the commenter.
![Assign to commenting user](img/quickly_assign_commenter_v13_1.png) ![Assign to commenting user](img/quickly_assign_commenter_v13_1.png)
...@@ -562,24 +560,3 @@ To disable it: ...@@ -562,24 +560,3 @@ To disable it:
```ruby ```ruby
Feature.disable(:confidential_notes) Feature.disable(:confidential_notes)
``` ```
## Enable or disable Batch Suggestions **(FREE SELF)**
Batch Suggestions is
deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can opt to disable it for your instance.
To enable it:
```ruby
# Instance-wide
Feature.enable(:batch_suggestions)
```
To disable it:
```ruby
# Instance-wide
Feature.disable(:batch_suggestions)
```
...@@ -18,38 +18,39 @@ and is automatically configured on [GitHub import](../../../integration/github.m ...@@ -18,38 +18,39 @@ and is automatically configured on [GitHub import](../../../integration/github.m
## Configuration ## Configuration
### Complete these steps on GitHub
This integration requires a [GitHub API token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) This integration requires a [GitHub API token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
with `repo:status` access granted: with `repo:status` access granted.
Complete these steps on GitHub:
1. Go to your "Personal access tokens" page at <https://github.com/settings/tokens> 1. Go to your **Personal access tokens** page at <https://github.com/settings/tokens>.
1. Click "Generate New Token" 1. Select **Generate new token**.
1. Ensure that `repo:status` is checked and click "Generate token" 1. Under **Note**, enter a name for the new token.
1. Copy the generated token to use on GitLab 1. Ensure that `repo:status` is checked and select **Generate token**.
1. Copy the generated token to use in GitLab.
### Complete these steps on GitLab Complete these steps in GitLab:
1. Navigate to the project you want to configure. 1. Go to the project you want to configure.
1. Navigate to the [Integrations page](overview.md#accessing-integrations) 1. Go to the [Integrations page](overview.md#accessing-integrations)
1. Click "GitHub". 1. Select **GitHub**.
1. Ensure that the **Active** toggle is enabled. 1. Ensure that the **Active** toggle is enabled.
1. Paste the token you've generated on GitHub 1. Paste the token you generated on GitHub.
1. Enter the path to your project on GitHub, such as `https://github.com/username/repository` 1. Enter the path to your project on GitHub, such as `https://github.com/username/repository`.
1. Optionally uncheck **Static status check names** checkbox to disable static status check names. 1. (Optional) To disable static status check names, clear the **Static status check names** checkbox.
1. Save or optionally click "Test Settings". 1. Select **Save changes** or optionally select **Test settings**.
Once the integration is configured, see [Pipelines for external pull requests](../../../ci/ci_cd_for_external_repos/#pipelines-for-external-pull-requests) After configuring the integration, see [Pipelines for external pull requests](../../../ci/ci_cd_for_external_repos/#pipelines-for-external-pull-requests)
to configure pipelines to run for open pull requests. to configure pipelines to run for open pull requests.
#### Static / dynamic status check names ### Static / dynamic status check names
> - Introduced in GitLab 11.5: using static status check names as opt-in option. > - Introduced in GitLab 11.5: using static status check names as opt-in option.
> - [In GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/9931), static status check names is default behavior for new projects. > - [In GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/9931), static status check names is default behavior for new projects.
This makes it possible to mark these status checks as _Required_ on GitHub. This makes it possible to mark these status checks as **Required** on GitHub.
With **Static status check names** enabled on the integration page, your
GitLab instance host name is appended to a status check name, When **Static status check names** is enabled on the integration page, your
whereas in case of dynamic status check names, a branch name is appended. GitLab instance host name is appended to a status check name.
![Configure GitHub Project Integration](img/github_configuration.png) When disabled, it uses dynamic status check names and appends the branch name.
...@@ -23,14 +23,14 @@ class GithubService < Service ...@@ -23,14 +23,14 @@ class GithubService < Service
end end
def description def description
"See pipeline statuses on GitHub for your commits and pull requests" s_("GithubIntegration|Obtain statuses for commits and pull requests.")
end end
def help def help
return unless project return unless project
docs_link = link_to _('Learn more'), help_page_url('user/project/repository/repository_mirroring') docs_link = link_to _('What is repository mirroring?'), help_page_url('user/project/repository/repository_mirroring')
s_("Integrations|This requires mirroring your GitHub repository to this project. %{docs_link}" % { docs_link: docs_link }).html_safe s_("GithubIntegration|This requires mirroring your GitHub repository to this project. %{docs_link}" % { docs_link: docs_link }).html_safe
end end
def self.to_param def self.to_param
...@@ -38,21 +38,28 @@ class GithubService < Service ...@@ -38,21 +38,28 @@ class GithubService < Service
end end
def fields def fields
learn_more_link_url = help_page_path('user/project/integrations/github', anchor: 'static--dynamic-status-check-name')
learn_more_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: learn_more_link_url }
static_context_field_help = s_('GithubIntegration|Select this if you want GitHub to mark status checks as "Required". %{learn_more_link_start}Learn more%{learn_more_link_end}.').html_safe % { learn_more_link_start: learn_more_link_start, learn_more_link_end: '</a>'.html_safe }
token_url = 'https://github.com/settings/tokens'
token_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: token_url }
token_field_help = s_('GithubIntegration|Create a %{token_link_start}personal access token%{token_link_end} with %{status_html} access granted and paste it here.').html_safe % { token_link_start: token_link_start, token_link_end: '</a>'.html_safe, status_html: '<code>repo:status</code>'.html_safe }
[ [
{ type: 'password', { type: 'password',
name: "token", name: "token",
required: true, required: true,
placeholder: "e.g. 8d3f016698e...", placeholder: "8d3f016698e...",
help: 'Create a <a href="https://github.com/settings/tokens">personal access token</a> with <code>repo:status</code> access granted and paste it here.'.html_safe }, help: token_field_help },
{ type: 'text', { type: 'text',
name: "repository_url", name: "repository_url",
title: 'Repository URL', title: s_('GithubIntegration|Repository URL'),
required: true, required: true,
placeholder: 'e.g. https://github.com/owner/repository' }, placeholder: 'https://github.com/owner/repository' },
{ type: 'checkbox', { type: 'checkbox',
name: "static_context", name: "static_context",
title: 'Static status check names', title: s_('GithubIntegration|Static status check names (optional)'),
help: 'GitHub status checks need static name in order to be marked as "required".' } help: static_context_field_help }
] ]
end end
......
...@@ -23,6 +23,7 @@ module Epics ...@@ -23,6 +23,7 @@ module Epics
track_start_date_fixed_events(epic) track_start_date_fixed_events(epic)
track_due_date_fixed_events(epic) track_due_date_fixed_events(epic)
track_fixed_dates_updated_events(epic)
epic.reset epic.reset
end end
...@@ -59,8 +60,22 @@ module Epics ...@@ -59,8 +60,22 @@ module Epics
private private
def track_fixed_dates_updated_events(epic)
fixed_start_date_updated = epic.saved_change_to_attribute?(:start_date_fixed)
fixed_due_date_updated = epic.saved_change_to_attribute?(:due_date_fixed)
return unless fixed_start_date_updated || fixed_due_date_updated
if fixed_start_date_updated
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_fixed_start_date_updated_action(author: current_user)
end
if fixed_due_date_updated
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_fixed_due_date_updated_action(author: current_user)
end
end
def track_start_date_fixed_events(epic) def track_start_date_fixed_events(epic)
return unless epic.saved_changes.key?('start_date_is_fixed') return unless epic.saved_change_to_attribute?(:start_date_is_fixed)
if epic.start_date_is_fixed? if epic.start_date_is_fixed?
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_start_date_set_as_fixed_action(author: current_user) ::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_start_date_set_as_fixed_action(author: current_user)
...@@ -70,7 +85,7 @@ module Epics ...@@ -70,7 +85,7 @@ module Epics
end end
def track_due_date_fixed_events(epic) def track_due_date_fixed_events(epic)
return unless epic.saved_changes.key?('due_date_is_fixed') return unless epic.saved_change_to_attribute?(:due_date_is_fixed)
if epic.due_date_is_fixed? if epic.due_date_is_fixed?
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_due_date_set_as_fixed_action(author: current_user) ::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_due_date_set_as_fixed_action(author: current_user)
...@@ -105,11 +120,11 @@ module Epics ...@@ -105,11 +120,11 @@ module Epics
end end
def track_changes(epic) def track_changes(epic)
if epic.saved_changes.key?('title') if epic.saved_change_to_attribute?(:title)
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_title_changed_action(author: current_user) ::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_title_changed_action(author: current_user)
end end
if epic.saved_changes.key?('description') if epic.saved_change_to_attribute?(:description)
::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_description_changed_action(author: current_user) ::Gitlab::UsageDataCounters::EpicActivityUniqueCounter.track_epic_description_changed_action(author: current_user)
end end
end end
......
---
title: Track epic change to fixed start/due dates via usage ping
merge_request: 57672
author:
type: other
---
title: Review and revise Integrations/GitHub UI text
merge_request: 57389
author:
type: other
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path: redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_start_date_monthly
description: Counts of MAU manually updating fixed start date
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: implemented
milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57672
time_frame: 28d
data_source: redis_hll
distribution:
- ee
tier:
- premium
- ultimate
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path: redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_due_date_monthly
description: Counts of MAU manually updating fixed due date
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: implemented
milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57672
time_frame: 28d
data_source: redis_hll
distribution:
- ee
tier:
- premium
- ultimate
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path: redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_due_date_weekly
description: Counts of WAU manually updating fixed due date
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: implemented
milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57672
time_frame: 7d
data_source: redis_hll
distribution:
- ee
tier:
- premium
- ultimate
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path: redis_hll_counters.epics_usage.g_project_management_users_updating_fixed_epic_start_date_weekly
description: Counts of WAU manually updating fixed start date
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: implemented
milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57672
time_frame: 7d
data_source: redis_hll
distribution:
- ee
tier:
- premium
- ultimate
...@@ -17,6 +17,8 @@ module Gitlab ...@@ -17,6 +17,8 @@ module Gitlab
EPIC_START_DATE_SET_AS_INHERITED = 'g_project_management_users_setting_epic_start_date_as_inherited' EPIC_START_DATE_SET_AS_INHERITED = 'g_project_management_users_setting_epic_start_date_as_inherited'
EPIC_DUE_DATE_SET_AS_FIXED = 'g_project_management_users_setting_epic_due_date_as_fixed' EPIC_DUE_DATE_SET_AS_FIXED = 'g_project_management_users_setting_epic_due_date_as_fixed'
EPIC_DUE_DATE_SET_AS_INHERITED = 'g_project_management_users_setting_epic_due_date_as_inherited' EPIC_DUE_DATE_SET_AS_INHERITED = 'g_project_management_users_setting_epic_due_date_as_inherited'
EPIC_FIXED_START_DATE_UPDATED = 'g_project_management_users_updating_fixed_epic_start_date'
EPIC_FIXED_DUE_DATE_UPDATED = 'g_project_management_users_updating_fixed_epic_due_date'
EPIC_ISSUE_ADDED = 'g_project_management_epic_issue_added' EPIC_ISSUE_ADDED = 'g_project_management_epic_issue_added'
EPIC_CLOSED = 'g_project_management_epic_closed' EPIC_CLOSED = 'g_project_management_epic_closed'
EPIC_REOPENED = 'g_project_management_epic_reopened' EPIC_REOPENED = 'g_project_management_epic_reopened'
...@@ -62,6 +64,14 @@ module Gitlab ...@@ -62,6 +64,14 @@ module Gitlab
track_unique_action(EPIC_DUE_DATE_SET_AS_INHERITED, author) track_unique_action(EPIC_DUE_DATE_SET_AS_INHERITED, author)
end end
def track_epic_fixed_start_date_updated_action(author:)
track_unique_action(EPIC_FIXED_START_DATE_UPDATED, author)
end
def track_epic_fixed_due_date_updated_action(author:)
track_unique_action(EPIC_FIXED_DUE_DATE_UPDATED, author)
end
def track_epic_issue_added(author:) def track_epic_issue_added(author:)
track_unique_action(EPIC_ISSUE_ADDED, author) track_unique_action(EPIC_ISSUE_ADDED, author)
end end
......
...@@ -112,6 +112,18 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl ...@@ -112,6 +112,18 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end end
context 'setting as fixed start date event' do
def track_action(params)
described_class.track_epic_fixed_start_date_updated_action(**params)
end
it_behaves_like 'a daily tracked issuable event' do
let(:action) { described_class::EPIC_FIXED_START_DATE_UPDATED }
end
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end
context 'setting as inherited event' do context 'setting as inherited event' do
def track_action(params) def track_action(params)
described_class.track_epic_start_date_set_as_inherited_action(**params) described_class.track_epic_start_date_set_as_inherited_action(**params)
...@@ -138,6 +150,18 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl ...@@ -138,6 +150,18 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end end
context 'setting as fixed due date event' do
def track_action(params)
described_class.track_epic_fixed_due_date_updated_action(**params)
end
it_behaves_like 'a daily tracked issuable event' do
let(:action) { described_class::EPIC_FIXED_DUE_DATE_UPDATED }
end
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end
context 'setting as inherited event' do context 'setting as inherited event' do
def track_action(params) def track_action(params)
described_class.track_epic_due_date_set_as_inherited_action(**params) described_class.track_epic_due_date_set_as_inherited_action(**params)
......
...@@ -348,6 +348,7 @@ RSpec.describe Epics::UpdateService do ...@@ -348,6 +348,7 @@ RSpec.describe Epics::UpdateService do
context 'epic start date fixed or inherited' do context 'epic start date fixed or inherited' do
it 'tracks the user action to set as fixed' do it 'tracks the user action to set as fixed' do
expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_start_date_set_as_fixed_action) expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_start_date_set_as_fixed_action)
expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_fixed_start_date_updated_action)
update_epic(start_date_is_fixed: true, start_date_fixed: Date.today) update_epic(start_date_is_fixed: true, start_date_fixed: Date.today)
end end
...@@ -362,6 +363,7 @@ RSpec.describe Epics::UpdateService do ...@@ -362,6 +363,7 @@ RSpec.describe Epics::UpdateService do
context 'epic due date fixed or inherited' do context 'epic due date fixed or inherited' do
it 'tracks the user action to set as fixed' do it 'tracks the user action to set as fixed' do
expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_due_date_set_as_fixed_action) expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_due_date_set_as_fixed_action)
expect(::Gitlab::UsageDataCounters::EpicActivityUniqueCounter).to receive(:track_epic_fixed_due_date_updated_action)
update_epic(due_date_is_fixed: true, due_date_fixed: Date.today) update_epic(due_date_is_fixed: true, due_date_fixed: Date.today)
end end
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
aggregation: daily aggregation: daily
feature_flag: track_epics_activity feature_flag: track_epics_activity
# epic notes
- name: g_project_management_users_creating_epic_notes - name: g_project_management_users_creating_epic_notes
category: epics_usage category: epics_usage
redis_slot: project_management redis_slot: project_management
...@@ -39,24 +41,40 @@ ...@@ -39,24 +41,40 @@
aggregation: daily aggregation: daily
feature_flag: track_epics_activity feature_flag: track_epics_activity
# start date events
- name: g_project_management_users_setting_epic_start_date_as_fixed - name: g_project_management_users_setting_epic_start_date_as_fixed
category: epics_usage category: epics_usage
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_epics_activity feature_flag: track_epics_activity
- name: g_project_management_users_updating_fixed_epic_start_date
category: epics_usage
redis_slot: project_management
aggregation: daily
feature_flag: track_epics_activity
- name: g_project_management_users_setting_epic_start_date_as_inherited - name: g_project_management_users_setting_epic_start_date_as_inherited
category: epics_usage category: epics_usage
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_epics_activity feature_flag: track_epics_activity
# due date events
- name: g_project_management_users_setting_epic_due_date_as_fixed - name: g_project_management_users_setting_epic_due_date_as_fixed
category: epics_usage category: epics_usage
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_epics_activity feature_flag: track_epics_activity
- name: g_project_management_users_updating_fixed_epic_due_date
category: epics_usage
redis_slot: project_management
aggregation: daily
feature_flag: track_epics_activity
- name: g_project_management_users_setting_epic_due_date_as_inherited - name: g_project_management_users_setting_epic_due_date_as_inherited
category: epics_usage category: epics_usage
redis_slot: project_management redis_slot: project_management
......
...@@ -14450,6 +14450,24 @@ msgstr "" ...@@ -14450,6 +14450,24 @@ msgstr ""
msgid "Gitea Import" msgid "Gitea Import"
msgstr "" msgstr ""
msgid "GithubIntegration|Create a %{token_link_start}personal access token%{token_link_end} with %{status_html} access granted and paste it here."
msgstr ""
msgid "GithubIntegration|Obtain statuses for commits and pull requests."
msgstr ""
msgid "GithubIntegration|Repository URL"
msgstr ""
msgid "GithubIntegration|Select this if you want GitHub to mark status checks as \"Required\". %{learn_more_link_start}Learn more%{learn_more_link_end}."
msgstr ""
msgid "GithubIntegration|Static status check names (optional)"
msgstr ""
msgid "GithubIntegration|This requires mirroring your GitHub repository to this project. %{docs_link}"
msgstr ""
msgid "Gitlab Pages" msgid "Gitlab Pages"
msgstr "" msgstr ""
...@@ -16709,9 +16727,6 @@ msgstr "" ...@@ -16709,9 +16727,6 @@ msgstr ""
msgid "Integrations|This integration, and inheriting projects were reset." msgid "Integrations|This integration, and inheriting projects were reset."
msgstr "" msgstr ""
msgid "Integrations|This requires mirroring your GitHub repository to this project. %{docs_link}"
msgstr ""
msgid "Integrations|To keep this project going, create a new issue." msgid "Integrations|To keep this project going, create a new issue."
msgstr "" msgstr ""
...@@ -34339,6 +34354,9 @@ msgstr "" ...@@ -34339,6 +34354,9 @@ msgstr ""
msgid "What does this command do?" msgid "What does this command do?"
msgstr "" msgstr ""
msgid "What is repository mirroring?"
msgstr ""
msgid "What is squashing?" msgid "What is squashing?"
msgstr "" msgstr ""
......
...@@ -54,7 +54,7 @@ RSpec.describe Oauth::AuthorizationsController do ...@@ -54,7 +54,7 @@ RSpec.describe Oauth::AuthorizationsController do
shared_examples "Implicit grant can't be used in confidential application" do shared_examples "Implicit grant can't be used in confidential application" do
context 'when application is confidential' do context 'when application is confidential' do
before do before do
application.update(confidential: true) application.update!(confidential: true)
params[:response_type] = 'token' params[:response_type] = 'token'
end end
...@@ -96,7 +96,7 @@ RSpec.describe Oauth::AuthorizationsController do ...@@ -96,7 +96,7 @@ RSpec.describe Oauth::AuthorizationsController do
end end
it 'deletes session.user_return_to and redirects when skip authorization' do it 'deletes session.user_return_to and redirects when skip authorization' do
application.update(trusted: true) application.update!(trusted: true)
request.session['user_return_to'] = 'http://example.com' request.session['user_return_to'] = 'http://example.com'
subject subject
......
...@@ -60,7 +60,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do ...@@ -60,7 +60,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
let(:extern_uid) { 'my-uid' } let(:extern_uid) { 'my-uid' }
before do before do
user.update(failed_attempts: User.maximum_attempts.pred) user.update!(failed_attempts: User.maximum_attempts.pred)
subject.response = ActionDispatch::Response.new subject.response = ActionDispatch::Response.new
end end
...@@ -233,7 +233,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do ...@@ -233,7 +233,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
settings = Gitlab::CurrentSettings.current_application_settings settings = Gitlab::CurrentSettings.current_application_settings
settings.update(disabled_oauth_sign_in_sources: [provider.to_s]) settings.update!(disabled_oauth_sign_in_sources: [provider.to_s])
end end
it 'prevents login via POST' do it 'prevents login via POST' do
...@@ -299,7 +299,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do ...@@ -299,7 +299,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
before do before do
stub_omniauth_setting(enabled: true, auto_link_user: true, allow_single_sign_on: ['atlassian_oauth2']) stub_omniauth_setting(enabled: true, auto_link_user: true, allow_single_sign_on: ['atlassian_oauth2'])
user.destroy user.destroy!
end end
it 'denies sign-in if sign-up is enabled, but block_auto_created_users is set' do it 'denies sign-in if sign-up is enabled, but block_auto_created_users is set' do
...@@ -381,7 +381,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do ...@@ -381,7 +381,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
context 'sign up' do context 'sign up' do
before do before do
user.destroy user.destroy!
end end
it 'denies login if sign up is enabled, but block_auto_created_users is set' do it 'denies login if sign up is enabled, but block_auto_created_users is set' do
......
...@@ -16,18 +16,12 @@ const DEFAULT_PROPS = { ...@@ -16,18 +16,12 @@ const DEFAULT_PROPS = {
describe('Suggestion Diff component', () => { describe('Suggestion Diff component', () => {
let wrapper; let wrapper;
const createComponent = (props, glFeatures = {}) => { const createComponent = (props) => {
wrapper = shallowMount(SuggestionDiffHeader, { wrapper = shallowMount(SuggestionDiffHeader, {
propsData: { propsData: {
...DEFAULT_PROPS, ...DEFAULT_PROPS,
...props, ...props,
}, },
provide: {
glFeatures: {
batchSuggestions: true,
...glFeatures,
},
},
}); });
}; };
...@@ -211,18 +205,6 @@ describe('Suggestion Diff component', () => { ...@@ -211,18 +205,6 @@ describe('Suggestion Diff component', () => {
}); });
}); });
describe('batchSuggestions feature flag is set to false', () => {
beforeEach(() => {
createComponent({}, { batchSuggestions: false });
});
it('disables add to batch buttons but keeps apply suggestion enabled', () => {
expect(findApplyButton().exists()).toBe(true);
expect(findAddToBatchButton().exists()).toBe(false);
expect(findApplyButton().attributes('disabled')).not.toBe('true');
});
});
describe('canApply is set to false', () => { describe('canApply is set to false', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ canApply: false }); createComponent({ canApply: false });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment