From 966edeabb3eaa40438d4ff69bb7bb997071f69c5 Mon Sep 17 00:00:00 2001 From: Bojan Marjanovic <bmarjanovic@gitlab.com> Date: Thu, 15 Feb 2024 15:12:24 +0000 Subject: [PATCH] Adds attribution_notice to Bugzilla integration Changelog: added --- .rubocop_todo/layout/line_length.yml | 1 - .rubocop_todo/rspec/feature_category.yml | 1 - .rubocop_todo/style/format_string.yml | 1 - app/models/integrations/bugzilla.rb | 14 ++++++++++++-- locale/gitlab.pot | 3 +++ spec/models/integrations/bugzilla_spec.rb | 7 +++++++ 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index 754d31a99b2dc..110c15b6336a1 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -331,7 +331,6 @@ Layout/LineLength: - 'app/models/integrations/asana.rb' - 'app/models/integrations/base_chat_notification.rb' - 'app/models/integrations/base_issue_tracker.rb' - - 'app/models/integrations/bugzilla.rb' - 'app/models/integrations/chat_message/merge_message.rb' - 'app/models/integrations/chat_message/note_message.rb' - 'app/models/integrations/chat_message/pipeline_message.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index 7ff9f8b091f7b..1c0bcb1ccc1bb 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -4453,7 +4453,6 @@ RSpec/FeatureCategory: - 'spec/models/integrations/base_issue_tracker_spec.rb' - 'spec/models/integrations/base_slack_notification_spec.rb' - 'spec/models/integrations/base_third_party_wiki_spec.rb' - - 'spec/models/integrations/bugzilla_spec.rb' - 'spec/models/integrations/buildkite_spec.rb' - 'spec/models/integrations/chat_message/alert_message_spec.rb' - 'spec/models/integrations/chat_message/base_message_spec.rb' diff --git a/.rubocop_todo/style/format_string.yml b/.rubocop_todo/style/format_string.yml index b4f4dbf4717a9..59674f796875c 100644 --- a/.rubocop_todo/style/format_string.yml +++ b/.rubocop_todo/style/format_string.yml @@ -77,7 +77,6 @@ Style/FormatString: - 'app/models/diff_note.rb' - 'app/models/diff_viewer/base.rb' - 'app/models/integrations/asana.rb' - - 'app/models/integrations/bugzilla.rb' - 'app/models/integrations/chat_message/pipeline_message.rb' - 'app/models/integrations/confluence.rb' - 'app/models/integrations/custom_issue_tracker.rb' diff --git a/app/models/integrations/bugzilla.rb b/app/models/integrations/bugzilla.rb index cdb27c91a272e..07f5ab5b2b11d 100644 --- a/app/models/integrations/bugzilla.rb +++ b/app/models/integrations/bugzilla.rb @@ -16,12 +16,22 @@ def self.description end def self.help - docs_link = ActionController::Base.helpers.link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/bugzilla'), target: '_blank', rel: 'noopener noreferrer' - s_("IssueTracker|Use Bugzilla as this project's issue tracker. %{docs_link}").html_safe % { docs_link: docs_link.html_safe } + docs_link = ActionController::Base.helpers.link_to(_('Learn more.'), + Rails.application.routes.url_helpers.help_page_url('user/project/integrations/bugzilla'), + target: '_blank', + rel: 'noopener noreferrer') + + help = format(s_("IssueTracker|Use Bugzilla as this project's issue tracker. %{docs_link}").html_safe, + docs_link: docs_link.html_safe) + help << "<br><br><i>#{attribution_notice}</i>".html_safe end def self.to_param 'bugzilla' end + + def self.attribution_notice + _('The Bugzilla logo is a trademark of the Mozilla Foundation in the U.S. and other countries.') + end end end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index f16c014d82431..1133b97550e09 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -49513,6 +49513,9 @@ msgstr[1] "" msgid "The API key used by GitLab for accessing the Spam Check service endpoint." msgstr "" +msgid "The Bugzilla logo is a trademark of the Mozilla Foundation in the U.S. and other countries." +msgstr "" + msgid "The CSV export will be created in the background. Once finished, it will be sent to %{email} in an attachment." msgstr "" diff --git a/spec/models/integrations/bugzilla_spec.rb b/spec/models/integrations/bugzilla_spec.rb index 60d28251cff80..4102eef7dc9a9 100644 --- a/spec/models/integrations/bugzilla_spec.rb +++ b/spec/models/integrations/bugzilla_spec.rb @@ -30,4 +30,11 @@ it { is_expected.not_to validate_presence_of(:new_issue_url) } end end + + describe '.attribution_notice' do + it do + expect(described_class.attribution_notice) + .to eq('The Bugzilla logo is a trademark of the Mozilla Foundation in the U.S. and other countries.') + end + end end -- GitLab