Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-04-08 06:10:54 +00:00
parent 4291c42aa0
commit dc6fe30d47
27 changed files with 232 additions and 66 deletions

View File

@ -23,7 +23,7 @@ module Integrations
no_data_error(s_('TestHooks|Ensure the project has notes.')) unless note.present?
Gitlab::DataBuilder::Note.build(note, current_user)
Gitlab::DataBuilder::Note.build(note, current_user, :create)
end
def issues_events_data

View File

@ -29,7 +29,7 @@ module Notes
end
def hook_data
Gitlab::DataBuilder::Note.build(note, note.author)
Gitlab::DataBuilder::Note.build(note, note.author, :create)
end
def execute_note_hooks

View File

@ -102,7 +102,7 @@ module Notes
def execute_note_webhook(note)
return unless note.project && note.previous_changes.include?('note')
note_data = Gitlab::DataBuilder::Note.build(note, note.author)
note_data = Gitlab::DataBuilder::Note.build(note, note.author, :update)
is_confidential = note.confidential?(include_noteable: true)
hooks_scope = is_confidential ? :confidential_note_hooks : :note_hooks

View File

@ -26,11 +26,11 @@
%li.gl-pb-3
= form.gitlab_ui_checkbox_component :note_events,
integration_webhook_event_human_name(:note_events),
help_text: s_('Webhooks|A comment is added to an issue or merge request.')
help_text: s_('Webhooks|A comment is made or edited on an issue or merge request.')
%li.gl-pb-3
= form.gitlab_ui_checkbox_component :confidential_note_events,
integration_webhook_event_human_name(:confidential_note_events),
help_text: s_('Webhooks|A comment is added to a confidential issue.')
help_text: s_('Webhooks|A comment is made or edited on a confidential issue.')
%li.gl-pb-3
= form.gitlab_ui_checkbox_component :issues_events,
integration_webhook_event_human_name(:issues_events),

View File

@ -1,8 +0,0 @@
---
name: search_index_all_projects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134456
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/432489
milestone: '16.7'
type: development
group: group::global search
default_enabled: true

View File

@ -4,7 +4,24 @@ classes:
- Boards::EpicListUserPreference
feature_categories:
- portfolio_management
description: Epic board list preferences on a per-user basis, specifically whether the user has collapsed the list or not
description: Epic board list preferences on a per-user basis, specifically whether
the user has collapsed the list or not
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54541
milestone: '13.10'
gitlab_schema: gitlab_main
gitlab_schema: gitlab_main_cell
allow_cross_joins:
- gitlab_main_clusterwide
allow_cross_transactions:
- gitlab_main_clusterwide
allow_cross_foreign_keys:
- gitlab_main_clusterwide
desired_sharding_key:
group_id:
references: namespaces
backfill_via:
parent:
foreign_key: epic_list_id
table: boards_epic_lists
sharding_key: group_id
belongs_to: epic_list
awaiting_backfill_on_parent: true

View File

@ -8,4 +8,20 @@ feature_categories:
description: Persists information about on-call rotation participants
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49058
milestone: '13.7'
gitlab_schema: gitlab_main
gitlab_schema: gitlab_main_cell
allow_cross_joins:
- gitlab_main_clusterwide
allow_cross_transactions:
- gitlab_main_clusterwide
allow_cross_foreign_keys:
- gitlab_main_clusterwide
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: oncall_rotation_id
table: incident_management_oncall_rotations
sharding_key: project_id
belongs_to: rotation
awaiting_backfill_on_parent: true

View File

@ -8,4 +8,20 @@ feature_categories:
description: Tracks past and present on-call shifts
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49423
milestone: '13.8'
gitlab_schema: gitlab_main
gitlab_schema: gitlab_main_cell
allow_cross_joins:
- gitlab_main_clusterwide
allow_cross_transactions:
- gitlab_main_clusterwide
allow_cross_foreign_keys:
- gitlab_main_clusterwide
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: rotation_id
table: incident_management_oncall_rotations
sharding_key: project_id
belongs_to: rotation
awaiting_backfill_on_parent: true

View File

@ -8,3 +8,13 @@ description: Stores diffs data for merge request context commits
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23701
milestone: '12.8'
gitlab_schema: gitlab_main_cell
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: merge_request_context_commit_id
table: merge_request_context_commits
sharding_key: project_id
belongs_to: merge_request_context_commit
awaiting_backfill_on_parent: true

View File

@ -0,0 +1,24 @@
# frozen_string_literal: true
class MigrateInputsToSpecOnCatalogResourceComponents < Gitlab::Database::Migration[2.2]
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '16.11'
disable_ddl_transaction!
def up
each_batch_range('catalog_resource_components') do |min, max|
execute <<~SQL
UPDATE catalog_resource_components
SET spec = jsonb_set('{}'::jsonb, '{inputs}', inputs::jsonb)
WHERE id BETWEEN #{min} AND #{max}
AND spec = '{}' AND inputs <> '{}'
SQL
end
end
def down
# no-op
end
end

View File

@ -0,0 +1 @@
ad8357914a0be5759d5ee1a4366cd56c0eed9f5d63ad5f75db219d089e9c465e

View File

@ -17,6 +17,9 @@ self-managed instances. If you are an administrator, to access the Admin Area:
- In GitLab 16.1 and later: on the left sidebar, select **Search or go to**, then select **Admin Area**.
- In GitLab 16.0 and earlier: on the top bar, select **Main menu > Admin**.
If the GitLab instance uses Admin Mode, you must [enable Admin Mode for your session](settings/sign_in_restrictions.md#turn-on-admin-mode-for-your-session) before
the **Admin Area** button is visible.
NOTE:
Only administrators can access the Admin Area.

View File

@ -399,13 +399,7 @@ from the Elasticsearch index as expected.
#### All project records are indexed
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/428070) in GitLab 16.7 [with a flag](../../administration/feature_flags.md) named `search_index_all_projects`. Disabled by default.
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/432489) in GitLab 16.9.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145300) in GitLab 16.10.
FLAG:
On self-managed GitLab, by default this feature is available.
To hide the feature, an administrator can [disable the feature flag](../../administration/feature_flags.md) named `search_index_all_projects`.
On GitLab.com, this feature is available. On GitLab Dedicated, this feature is not available.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148111) in GitLab 16.11. Feature flag `search_index_all_projects` removed.
When you select the **Limit the amount of namespace and project data to index** checkbox:

View File

@ -42,7 +42,9 @@ GitLab integrates with open-source tools for vulnerability static analysis in co
WARNING:
Support for Grype was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/439164) in GitLab
16.9 and is planned for removal in 17.0. Use Trivy instead.
16.9 and is planned for removal in 17.0. Use Trivy instead.
In GitLab 17.0 and later, the Grype analyzer will no longer be maintained, except for limited fixes as explained in our [statement of support](https://about.gitlab.com/support/statement-of-support/#version-support).
The existing current major version for the Grype analyzer image will continue to be updated with the latest advisory database, and operating system packages until GitLab 19.0, at which point the analyzer will stop working.
To integrate GitLab with security scanners other than those listed here, see
[Security scanner integration](../../../development/integrations/secure.md).

View File

@ -21,7 +21,7 @@ Event type | Trigger
[Push event](#push-events) | A push is made to the repository.
[Tag event](#tag-events) | Tags are created or deleted in the repository.
[Issue event](#issue-events) | A new issue is created or an existing issue is updated, closed, or reopened.
[Comment event](#comment-events) | A new comment is made on commits, merge requests, issues, and code snippets.
[Comment event](#comment-events) | A new comment is made or edited on commits, merge requests, issues, and code snippets. <sup>1</sup>
[Merge request event](#merge-request-events) | A merge request is created, updated, merged, or closed, or a commit is added in the source branch.
[Wiki page event](#wiki-page-events) | A wiki page is created, updated, or deleted.
[Pipeline event](#pipeline-events) | A pipeline status changes.
@ -32,6 +32,10 @@ Event type | Trigger
[Emoji event](#emoji-events) | An emoji reaction is added or removed.
[Project or group access token event](#project-and-group-access-token-events) | A project or group access token will expire in seven days.
**Footnotes:**
1. Comment events triggered when the comment is edited [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127169) in GitLab 16.11.
**Events triggered for group webhooks only:**
Event type | Trigger
@ -380,20 +384,27 @@ Payload example:
## Comment events
Comment events are triggered when a new comment is made on commits,
> - `object_attributes.action` property [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147856) in GitLab 16.11.
Comment events are triggered when a new comment is made or edited on commits,
merge requests, issues, and code snippets.
The note data is stored in `object_attributes` (for example, `note` or `noteable_type`).
The payload includes information about the target of the comment. For example,
a comment on an issue includes specific issue information under the `issue` key.
The valid target types are:
The available target types are:
- `commit`
- `merge_request`
- `issue`
- `snippet`
The available values for `object_attributes.action` in the payload are:
- `create`
- `update`
### Comment on a commit
Request header:
@ -462,6 +473,7 @@ Payload example:
"renamed_file": false,
"deleted_file": false
},
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/commit/cfe32cf61b73a0d5e9f13e774abde7ff789b1660#note_1243"
},
"commit": {
@ -536,6 +548,7 @@ Payload example:
"noteable_id": 7,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/merge_requests/1#note_1244"
},
"merge_request": {
@ -697,6 +710,7 @@ Payload example:
"noteable_id": 92,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/issues/17#note_1241"
},
"issue": {
@ -803,6 +817,7 @@ Payload example:
"noteable_id": 53,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/-/snippets/53#note_1245"
},
"snippet": {

View File

@ -5,6 +5,8 @@ module Gitlab
module Note
extend self
VALID_ACTIONS = %i[create update].freeze
# Produce a hash of post-receive data
#
# For all notes:
@ -36,9 +38,11 @@ module Gitlab
# - merge_request
# - snippet
#
def build(note, user)
def build(note, user, action)
raise ArgumentError, 'invalid action' unless action.in?(VALID_ACTIONS)
project = note.project
data = build_base_data(project, user, note)
data = build_base_data(project, user, note, action)
if note.for_commit?
data[:commit] = build_data_for_commit(project, user, note)
@ -53,22 +57,22 @@ module Gitlab
data
end
def build_base_data(project, user, note)
def build_base_data(project, user, note, action)
event_type = note.confidential?(include_noteable: true) ? 'confidential_note' : 'note'
base_data = {
{
object_kind: "note",
event_type: event_type,
user: user.hook_attrs,
project_id: project.id,
project: project.hook_attrs,
object_attributes: note.hook_attrs,
object_attributes: note.hook_attrs.merge(
action: action.to_s,
url: Gitlab::UrlBuilder.build(note)
),
# DEPRECATED
repository: project.hook_attrs.slice(:name, :url, :description, :homepage)
}
base_data[:object_attributes][:url] = Gitlab::UrlBuilder.build(note)
base_data
end
def build_data_for_commit(project, user, note)

View File

@ -57065,10 +57065,10 @@ msgstr ""
msgid "Webhooks|+ Mask another portion of URL"
msgstr ""
msgid "Webhooks|A comment is added to a confidential issue."
msgid "Webhooks|A comment is made or edited on a confidential issue."
msgstr ""
msgid "Webhooks|A comment is added to an issue or merge request."
msgid "Webhooks|A comment is made or edited on an issue or merge request."
msgstr ""
msgid "Webhooks|A confidential issue is created, updated, closed, or reopened."

View File

@ -90,11 +90,11 @@ fi
# Do not use dashes (-) in directory names, use underscores (_) instead.
# Number of directories with dashes as of 2021-09-17
NUMBER_DASHES=2
FIND_DASHES=$(find doc -type d -name "*-*" | wc -l)
DIR_NUMBER_DASHES=2
DIR_FIND_DASHES=$(find doc -type d -name "*-*" | wc -l)
# shellcheck disable=2059
printf "${COLOR_GREEN}INFO: Checking for directory names containing dashes...${COLOR_RESET}\n"
if [ "${FIND_DASHES}" -ne $NUMBER_DASHES ]
if [ "${DIR_FIND_DASHES}" -ne $DIR_NUMBER_DASHES ]
then
# shellcheck disable=2059
printf "${COLOR_RED}ERROR: The number of directory names containing dashes has changed!${COLOR_RESET} Use underscores instead of dashes for the directory names.\n" >&2
@ -103,6 +103,21 @@ then
((ERRORCODE++))
fi
# Do not use dashes (-) in filenames, use underscores (_) instead.
# Number of filenames with dashes as of 2024-03-29
FILE_NUMBER_DASHES=73
FILE_FIND_DASHES=$(find doc -type f -name "*-*.md" | wc -l)
# shellcheck disable=2059
printf "${COLOR_GREEN}INFO: Checking for filenames containing dashes...${COLOR_RESET}\n"
if [ "${FILE_FIND_DASHES}" -ne $FILE_NUMBER_DASHES ]
then
# shellcheck disable=2059
printf "${COLOR_RED}ERROR: The number of filenames containing dashes has changed!${COLOR_RESET} Use underscores instead of dashes for the filenames.\n" >&2
printf "If removing a file containing dashes, update the filename NUMBER_DASHES in lint-doc.sh.\n" >&2
printf "https://docs.gitlab.com/ee/development/documentation/site_architecture/folder_structure.html#work-with-directories-and-files\n"
((ERRORCODE++))
fi
# Do not use uppercase letters in directory and file names, use all lowercase instead.
# (find always returns 0, so we use the grep hack https://serverfault.com/a/225827)
FIND_UPPERCASE_DIRS=$(find doc -type d -name "*[[:upper:]]*")

View File

@ -2,18 +2,19 @@
require 'spec_helper'
RSpec.describe Gitlab::DataBuilder::Note do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
let(:data) { described_class.build(note, user) }
RSpec.describe Gitlab::DataBuilder::Note, feature_category: :webhooks do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) }
let(:action) { :create }
let(:data) { described_class.build(note, user, action) }
let(:fixed_time) { Time.at(1425600000) } # Avoid time precision errors
shared_examples 'includes general data' do
specify do
expect(data).to have_key(:object_attributes)
expect(data[:object_attributes]).to have_key(:url)
expect(data[:object_attributes][:url])
.to eq(Gitlab::UrlBuilder.build(note))
expect(data[:object_attributes][:url]).to eq(Gitlab::UrlBuilder.build(note))
expect(data[:object_attributes][:action]).to eq('create')
expect(data[:object_kind]).to eq('note')
expect(data[:user]).to eq(user.hook_attrs)
end
@ -158,4 +159,20 @@ RSpec.describe Gitlab::DataBuilder::Note do
include_examples 'project hook data'
include_examples 'deprecated repository hook data'
end
describe 'object_attributes.action value' do
let_it_be(:note) { create(:note, project: project) }
describe 'when action is `:update`' do
let(:action) { :update }
it { expect(data[:object_attributes][:action]).to eq('update') }
end
describe 'when action is invalid' do
let(:action) { :invalid }
it { expect { data }.to raise_error(ArgumentError) }
end
end
end

View File

@ -0,0 +1,40 @@
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe MigrateInputsToSpecOnCatalogResourceComponents, feature_category: :pipeline_composition do
let(:namespaces_table) { table(:namespaces) }
let(:projects_table) { table(:projects) }
let(:resources_table) { table(:catalog_resources) }
let(:releases_table) { table(:releases) }
let(:versions_table) { table(:catalog_resource_versions) }
let(:components_table) { table(:catalog_resource_components) }
it 'fills in the spec column for components with an inputs value and no spec value', :aggregate_failures do
namespace = namespaces_table.create!(name: 'test', path: 'test')
project = projects_table.create!(namespace_id: namespace.id, project_namespace_id: namespace.id)
resource = resources_table.create!(project_id: project.id)
release = releases_table.create!(released_at: Time.current, tag: 'test')
version = versions_table.create!(release_id: release.id, catalog_resource_id: resource.id, project_id: project.id)
component_needs_spec = components_table.create!(
name: 'test', inputs: { test_input: nil }, spec: {},
version_id: version.id, project_id: project.id, catalog_resource_id: resource.id
)
component_has_spec = components_table.create!(
name: 'test', spec: { inputs: { test_input: nil } }, inputs: {},
version_id: version.id, project_id: project.id, catalog_resource_id: resource.id
)
component_no_spec = components_table.create!(
name: 'test', spec: {}, inputs: {},
version_id: version.id, project_id: project.id, catalog_resource_id: resource.id
)
migrate!
expect(component_needs_spec.reload.spec).to eq({ 'inputs' => { 'test_input' => nil } })
expect(component_has_spec.reload.spec).to eq({ 'inputs' => { 'test_input' => nil } })
expect(component_no_spec.reload.spec).to be_empty
end
end

View File

@ -118,7 +118,7 @@ RSpec.describe Integrations::BaseChatNotification, feature_category: :integratio
let_it_be(:issue) { create(:labeled_issue, project: project, labels: [label, label_2, label_3]) }
let_it_be(:note) { create(:note, noteable: issue, project: project) }
let(:data) { Gitlab::DataBuilder::Note.build(note, user) }
let(:data) { Gitlab::DataBuilder::Note.build(note, user, :create) }
shared_examples 'notifies the chat integration' do
specify do
@ -262,7 +262,7 @@ RSpec.describe Integrations::BaseChatNotification, feature_category: :integratio
context 'labels are distributed on multiple objects' do
let(:label_filter) { '~Bug, ~Backend' }
let(:data) do
Gitlab::DataBuilder::Note.build(note, user).merge({
Gitlab::DataBuilder::Note.build(note, user, :create).merge({
issue: {
labels: [
{ title: 'Bug' }

View File

@ -144,7 +144,7 @@ RSpec.describe Integrations::HangoutsChat, feature_category: :integrations do
end
it "adds thread key" do
data = Gitlab::DataBuilder::Note.build(commit_note, user)
data = Gitlab::DataBuilder::Note.build(commit_note, user, :create)
WebMock.stub_request(:post, webhook_url_regex)
.with { |request| expect(thread_key_from_request(request)).to match(/commit .*?/) }
@ -163,7 +163,7 @@ RSpec.describe Integrations::HangoutsChat, feature_category: :integrations do
end
it "adds thread key" do
data = Gitlab::DataBuilder::Note.build(merge_request_note, user)
data = Gitlab::DataBuilder::Note.build(merge_request_note, user, :create)
WebMock.stub_request(:post, webhook_url_regex)
.with { |request| expect(thread_key_from_request(request)).to match(/merge request .*?/) }
@ -182,7 +182,7 @@ RSpec.describe Integrations::HangoutsChat, feature_category: :integrations do
end
it "adds thread key" do
data = Gitlab::DataBuilder::Note.build(issue_note, user)
data = Gitlab::DataBuilder::Note.build(issue_note, user, :create)
WebMock.stub_request(:post, webhook_url_regex)
.with { |request| expect(thread_key_from_request(request)).to match(/issue .*?/) }
@ -201,7 +201,7 @@ RSpec.describe Integrations::HangoutsChat, feature_category: :integrations do
end
it "adds thread key" do
data = Gitlab::DataBuilder::Note.build(snippet_note, user)
data = Gitlab::DataBuilder::Note.build(snippet_note, user, :create)
WebMock.stub_request(:post, webhook_url_regex)
.with { |request| expect(thread_key_from_request(request)).to match(/snippet .*?/) }

View File

@ -143,7 +143,7 @@ RSpec.describe Integrations::MicrosoftTeams, feature_category: :integrations do
end
it "calls Microsoft Teams API for commit comment events" do
data = Gitlab::DataBuilder::Note.build(commit_note, user)
data = Gitlab::DataBuilder::Note.build(commit_note, user, :create)
chat_integration.execute(data)
@ -157,7 +157,7 @@ RSpec.describe Integrations::MicrosoftTeams, feature_category: :integrations do
end
it "calls Microsoft Teams API for merge request comment events" do
data = Gitlab::DataBuilder::Note.build(merge_request_note, user)
data = Gitlab::DataBuilder::Note.build(merge_request_note, user, :create)
chat_integration.execute(data)
@ -171,7 +171,7 @@ RSpec.describe Integrations::MicrosoftTeams, feature_category: :integrations do
end
it "calls Microsoft Teams API for issue comment events" do
data = Gitlab::DataBuilder::Note.build(issue_note, user)
data = Gitlab::DataBuilder::Note.build(issue_note, user, :create)
chat_integration.execute(data)
@ -185,7 +185,7 @@ RSpec.describe Integrations::MicrosoftTeams, feature_category: :integrations do
end
it "calls Microsoft Teams API for snippet comment events" do
data = Gitlab::DataBuilder::Note.build(snippet_note, user)
data = Gitlab::DataBuilder::Note.build(snippet_note, user, :create)
chat_integration.execute(data)

View File

@ -93,7 +93,7 @@ RSpec.describe Integrations::GroupMentionService, feature_category: :integration
end
context 'for issue notes' do
let(:hook_data) { Gitlab::DataBuilder::Note.build(mentionable, mentionable.author) }
let(:hook_data) { Gitlab::DataBuilder::Note.build(mentionable, mentionable.author, :create) }
let(:is_confidential) { mentionable.confidential?(include_noteable: true) }
context 'in public projects' do

View File

@ -223,7 +223,7 @@ RSpec.shared_examples "chat integration" do |integration_name, supports_deployme
end
context "with note events" do
let(:sample_data) { Gitlab::DataBuilder::Note.build(note, user) }
let(:sample_data) { Gitlab::DataBuilder::Note.build(note, user, :create) }
context "with commit comment" do
let_it_be(:note) do

View File

@ -105,7 +105,7 @@ RSpec.shared_examples Integrations::BaseSlackNotification do |factory:|
context 'for note notification' do
let_it_be(:issue_note) { create(:note_on_issue, project: project, note: 'issue note') }
let(:data) { Gitlab::DataBuilder::Note.build(issue_note, user) }
let(:data) { Gitlab::DataBuilder::Note.build(issue_note, user, :create) }
it_behaves_like 'increases the usage data counter', :note
end
@ -126,7 +126,7 @@ RSpec.shared_examples Integrations::BaseSlackNotification do |factory:|
create(:note_on_issue, project: project, note: 'issue note', confidential: true)
end
let(:data) { Gitlab::DataBuilder::Note.build(confidential_issue_note, user) }
let(:data) { Gitlab::DataBuilder::Note.build(confidential_issue_note, user, :create) }
it_behaves_like 'increases the usage data counter', :confidential_note
end

View File

@ -238,7 +238,7 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
context 'note event' do
let_it_be(:issue_note) { create(:note_on_issue, project: project, note: "issue note") }
let(:data) { Gitlab::DataBuilder::Note.build(issue_note, user) }
let(:data) { Gitlab::DataBuilder::Note.build(issue_note, user, :create) }
it_behaves_like 'calls the integration API with the event message', /commented on issue/
@ -475,7 +475,7 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
end
let(:data) do
Gitlab::DataBuilder::Note.build(commit_note, user)
Gitlab::DataBuilder::Note.build(commit_note, user, :create)
end
it_behaves_like "triggered #{integration_name} integration", event_type: "commit comment"
@ -487,7 +487,7 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
end
let(:data) do
Gitlab::DataBuilder::Note.build(merge_request_note, user)
Gitlab::DataBuilder::Note.build(merge_request_note, user, :create)
end
it_behaves_like "triggered #{integration_name} integration", event_type: "merge request comment"
@ -499,7 +499,7 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
end
let(:data) do
Gitlab::DataBuilder::Note.build(issue_note, user)
Gitlab::DataBuilder::Note.build(issue_note, user, :create)
end
it_behaves_like "triggered #{integration_name} integration", event_type: "issue comment"
@ -511,7 +511,7 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
end
let(:data) do
Gitlab::DataBuilder::Note.build(snippet_note, user)
Gitlab::DataBuilder::Note.build(snippet_note, user, :create)
end
it_behaves_like "triggered #{integration_name} integration", event_type: "snippet comment"