Skip to content
代码片段 群组 项目
提交 55e2056d 编辑于 作者: Marc Shaw's avatar Marc Shaw
浏览文件

Remove the summarize_diff quick action

MR: gitlab.com/gitlab-org/gitlab/-/merge_requests/126827

Changelog: other
上级 44c382f2
No related branches found
No related tags found
无相关合并请求
......@@ -188,8 +188,7 @@ def extract_updates(commands)
next unless definition
definition.execute(self, arg)
# summarize_diff will be removed https://gitlab.com/gitlab-org/gitlab/-/issues/407258#note_1385269274
usage_ping_tracking(definition.name, arg) unless definition.name == :summarize_diff
usage_ping_tracking(definition.name, arg)
end
end
......
---
name: summarize_diff_quick_action
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117458
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/407256
milestone: '15.11'
type: development
group: group::code review
default_enabled: false
......@@ -21,25 +21,6 @@ module MergeRequestActions
command :reassign_reviewer do |reassign_param|
@updates[:reviewer_ids] = extract_users(reassign_param).map(&:id)
end
desc { _('Create LLM-generated summary from diff(s)') }
explanation { _('Creates a LLM-generated summary from diff(s).') }
execution_message { _('Request for summary queued.') }
types MergeRequest
condition do
::Feature.enabled?(:summarize_diff_quick_action, current_user) &&
::Llm::MergeRequests::SummarizeDiffService.enabled?(
group: quick_action_target.project.root_ancestor,
user: current_user
)
end
command :summarize_diff do
::MergeRequests::Llm::SummarizeMergeRequestWorker.new.perform(
current_user.id,
{ 'type' => ::MergeRequests::Llm::SummarizeMergeRequestWorker::SUMMARIZE_QUICK_ACTION,
'merge_request_id' => quick_action_target.id }
)
end
end
end
end
......
......@@ -450,66 +450,6 @@
end
end
context "summarize_diff command" do
let(:content) { "/summarize_diff" }
let(:summarize_flag) { true }
let(:summarize_diff_enabled) { true }
before do
stub_feature_flags(summarize_diff_quick_action: summarize_flag)
allow(::Llm::MergeRequests::SummarizeDiffService).to receive(:enabled?).and_return(summarize_diff_enabled)
end
context "when the checks are enabled" do
context 'when summarize_diff_vertex is enabled' do
before do
allow_next_instance_of(Gitlab::Llm::VertexAi::Client) do |llm_client|
allow(llm_client).to receive(:text)
end
end
it "applies /summarize_diff" do
_, _, msg = service.execute(content, merge_request)
expect(msg).to include("Request for summary queued")
end
end
context 'when summarize_diff_vertex is disabled' do
before do
stub_feature_flags(summarize_diff_vertex: false)
end
it "applies /summarize_diff" do
_, _, msg = service.execute(content, merge_request)
expect(msg).to include("Request for summary queued")
end
end
end
context "when :summarize_diff_quick_action feature flag is disabled" do
let(:summarize_flag) { false }
it "doesn't apply /summarize_diff" do
_, _, msg = service.execute(content, merge_request)
expect(msg).to include("Could not apply summarize_diff command")
end
end
context "when SummarizeDiffService is disabled" do
let(:summarize_diff_enabled) { false }
it "doesn't apply /summarize_diff" do
_, _, msg = service.execute(content, merge_request)
expect(msg).to include("Could not apply summarize_diff command")
end
end
end
context 'iteration command' do
let_it_be(:iteration) { create(:iteration, iterations_cadence: create(:iterations_cadence, group: group)) }
......
......@@ -13069,9 +13069,6 @@ msgstr ""
msgid "Create AI-generated commit message"
msgstr ""
 
msgid "Create LLM-generated summary from diff(s)"
msgstr ""
msgid "Create New Directory"
msgstr ""
 
......@@ -13522,9 +13519,6 @@ msgstr ""
msgid "Created on:"
msgstr ""
 
msgid "Creates a LLM-generated summary from diff(s)."
msgstr ""
msgid "Creates a branch and a merge request to resolve this issue."
msgstr ""
 
......@@ -39010,9 +39004,6 @@ msgstr ""
msgid "Request details"
msgstr ""
 
msgid "Request for summary queued."
msgstr ""
msgid "Request parameter %{param} is missing."
msgstr ""
 
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册