Skip to content
代码片段 群组 项目
提交 b75d384b 编辑于 作者: Sincheol (David) Kim's avatar Sincheol (David) Kim
浏览文件

Merge branch '354373-remove-flag' into 'master'

Include related MR Jira issue keys for branches

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117350



Merged-by: default avatarSincheol (David) Kim <dkim@gitlab.com>
Approved-by: default avatarCarla Drago <cdrago@gitlab.com>
Approved-by: default avatarSincheol (David) Kim <dkim@gitlab.com>
Approved-by: default avatarAshraf Khamis <akhamis@gitlab.com>
Co-authored-by: default avatarLuke Duncalfe <lduncalfe@eml.cc>
No related branches found
No related tags found
无相关合并请求
......@@ -18,9 +18,7 @@ def perform(merge_request_id, update_sequence_id)
return unless merge_request && project
branches = if Feature.enabled?(:jira_include_keys_from_associated_mr_for_branch, project) && merge_request.open?
[project.repository.find_branch(merge_request.source_branch)].compact.presence
end
branches = [project.repository.find_branch(merge_request.source_branch)].compact.presence if merge_request.open?
JiraConnect::SyncService.new(project).execute(merge_requests: [merge_request], branches: branches, update_sequence_id: update_sequence_id)
end
......
---
name: jira_include_keys_from_associated_mr_for_branch
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115448
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/398773
milestone: '15.11'
type: development
group: group::integrations
default_enabled: false
......@@ -34,7 +34,7 @@ The information displayed in the Jira development panel depends on where you men
| GitLab: where you mention the Jira issue ID | Jira development panel: what information is displayed |
|------------------------------------------------|-------------------------------------------------------|
| Merge request title or description | Link to the merge request |
| Merge request title or description | Link to the merge request<br>[GitLab 15.11 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/354373): Link to the branch |
| Branch name | Link to the branch |
| Commit message | Link to the commit |
| [Jira Smart Commit](#jira-smart-commits) | Custom comment, logged time, or workflow transition |
......
......@@ -16,10 +16,6 @@ def initialize(project, branch_name)
# Use BatchLoader to load this data without N+1 queries when serializing multiple branches
# in `Atlassian::JiraConnect::Serializers::BranchEntity`.
def issue_keys
unless Feature.enabled?(:jira_include_keys_from_associated_mr_for_branch, project)
return JiraIssueKeyExtractor.new(branch_name).issue_keys
end
BatchLoader.for(branch_name).batch do |branch_names, loader|
merge_requests = MergeRequest
.select(:description, :source_branch, :title)
......
......@@ -51,14 +51,6 @@
end
it { is_expected.to eq(%w[BRANCH-1 OPEN_MR_TITLE-1 OPEN_MR_DESC-1]) }
context 'when the flag is disabled' do
before do
stub_feature_flags(jira_include_keys_from_associated_mr_for_branch: false)
end
it { is_expected.to eq(['BRANCH-1']) }
end
end
end
end
......
......@@ -63,13 +63,5 @@ def perform
it_behaves_like 'does not send any branch data'
end
context 'when flag is disabled' do
before do
stub_feature_flags(jira_include_keys_from_associated_mr_for_branch: false)
end
it_behaves_like 'does not send any branch data'
end
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册