Class: GitlabQuality::TestTooling::Report::FeatureReadiness::ReportOnEpic
- Inherits:
-
Object
- Object
- GitlabQuality::TestTooling::Report::FeatureReadiness::ReportOnEpic
- Extended by:
- FeatureReadiness::Concerns::WorkItemConcern
- Defined in:
- lib/gitlab_quality/test_tooling/report/feature_readiness/report_on_epic.rb
Constant Summary collapse
- FEATURE_READINESS_REPORT_COMMENT_ID =
'<!-- FEATURE READINESS REPORT COMMENT -->'
Constants included from FeatureReadiness::Concerns::WorkItemConcern
FeatureReadiness::Concerns::WorkItemConcern::OPERATIONAL_READINESS_NOTE_ID, FeatureReadiness::Concerns::WorkItemConcern::OPERATIONAL_READINESS_TRACKING_LABEL
Class Method Summary collapse
Methods included from FeatureReadiness::Concerns::WorkItemConcern
add_labels, add_operational_readiness_precheck_comment, existing_note_containing_text, extract_id_from_gid, fetch_work_item, get_id_for_group_label, get_id_for_label, get_issue_iids, get_labels, has_a_child_epic?, has_label?, ids_for_group_labels, ids_for_labels, label_gids, link_operation_readiness_issue, linked_issue_iids, note_has_emoji?, post_comment_about_operation_readiness_issue_created, work_item_author_id
Class Method Details
.report(analyzed_epic, work_item_client) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/gitlab_quality/test_tooling/report/feature_readiness/report_on_epic.rb', line 16 def report(analyzed_epic, work_item_client) must_haves_report_rows = generate_report_rows(analyzed_epic, :must_haves) should_haves_report_rows = generate_report_rows(analyzed_epic, :should_haves) existing_note = existing_note_containing_text(FEATURE_READINESS_REPORT_COMMENT_ID, analyzed_epic[:epic_iid], work_item_client) if existing_note work_item_client.update_note(note_id: existing_note[:id], body: comment({ must_haves: must_haves_report_rows, should_haves: should_haves_report_rows }, analyzed_epic).tr('"', "'")) else work_item_client.create_discussion(id: analyzed_epic[:epic_id], note: comment({ must_haves: must_haves_report_rows, should_haves: should_haves_report_rows }, analyzed_epic).tr('"', "'")) end end |