From 8ec8da0491ad89604700b3e29a227966f6d84ba1 Mon Sep 17 00:00:00 2001 From: Perl Tidy Date: Wed, 5 Dec 2018 15:38:52 -0500 Subject: no bug - reformat all the code using the new perltidy rules --- extensions/BMO/lib/Data.pm | 403 +++++++++++++++++++++------------------------ 1 file changed, 190 insertions(+), 213 deletions(-) (limited to 'extensions/BMO/lib/Data.pm') diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index 349f88093..a1e010346 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -15,13 +15,13 @@ use base qw(Exporter); use Tie::IxHash; our @EXPORT = qw( $cf_visible_in_products - %group_change_notification - $cf_setters - @always_fileable_groups - %group_auto_cc - %create_bug_formats - @default_named_queries - %autodetect_attach_urls ); + %group_change_notification + $cf_setters + @always_fileable_groups + %group_auto_cc + %create_bug_formats + @default_named_queries + %autodetect_attach_urls ); # Creating an attachment whose contents is a URL matching one of these regexes # will result in the user being redirected to that URL when viewing the @@ -43,35 +43,37 @@ my $mozreview_url_re = qr{ }ix; sub phabricator_url_re { - my $phab_uri = Bugzilla->params->{phabricator_base_uri} || 'https://example.com'; - return qr/^\Q${phab_uri}\ED\d+$/i; + my $phab_uri + = Bugzilla->params->{phabricator_base_uri} || 'https://example.com'; + return qr/^\Q${phab_uri}\ED\d+$/i; } our %autodetect_attach_urls = ( - github_pr => { - title => 'GitHub Pull Request', - regex => qr#^https://github\.com/[^/]+/[^/]+/pull/\d+/?$#i, - content_type => 'text/x-github-pull-request', - can_review => 1, - }, - reviewboard => { - title => 'MozReview', - regex => $mozreview_url_re, - content_type => 'text/x-review-board-request', - can_review => 0, - }, - Phabricator => { - title => 'Phabricator', - regex => \&phabricator_url_re, - content_type => 'text/x-phabricator-request', - can_review => 1, - }, - google_docs => { - title => 'Google Doc', - regex => qr#^https://docs\.google\.com/(?:document|spreadsheets|presentation)/d/#i, - content_type => 'text/x-google-doc', - can_review => 0, - }, + github_pr => { + title => 'GitHub Pull Request', + regex => qr#^https://github\.com/[^/]+/[^/]+/pull/\d+/?$#i, + content_type => 'text/x-github-pull-request', + can_review => 1, + }, + reviewboard => { + title => 'MozReview', + regex => $mozreview_url_re, + content_type => 'text/x-review-board-request', + can_review => 0, + }, + Phabricator => { + title => 'Phabricator', + regex => \&phabricator_url_re, + content_type => 'text/x-phabricator-request', + can_review => 1, + }, + google_docs => { + title => 'Google Doc', + regex => + qr#^https://docs\.google\.com/(?:document|spreadsheets|presentation)/d/#i, + content_type => 'text/x-google-doc', + can_review => 0, + }, ); # Which custom fields are visible in which products and components. @@ -83,209 +85,184 @@ our %autodetect_attach_urls = ( # # IxHash keeps them in insertion order, and so we get regexp priorities right. our $cf_visible_in_products; -tie(%$cf_visible_in_products, "Tie::IxHash", - qr/^cf_colo_site$/ => { - "mozilla.org" => [ - "Server Operations", - "Server Operations: DCOps", - "Server Operations: Projects", - "Server Operations: RelEng", - "Server Operations: Security", - ], - "Infrastructure & Operations" => [ - "RelOps", - "RelOps: Puppet", - "DCOps", - ], - }, - qr/^cf_office$/ => { - "mozilla.org" => ["Server Operations: Desktop Issues"], - }, - qr/^cf_crash_signature$/ => { - "Add-on SDK" => [], - "addons.mozilla.org" => [], - "Android Background Services" => [], - "B2GDroid" => [], - "Calendar" => [], - "Composer" => [], - "Core" => [], - "DevTools" => [], - "Directory" => [], - "External Software Affecting Firefox" => [], - "Firefox" => [], - "Firefox for Android" => [], - "GeckoView" => [], - "JSS" => [], - "MailNews Core" => [], - "Mozilla Labs" => [], - "Mozilla Localizations" => [], - "mozilla.org" => [], - "Cloud Services" => [], - "NSPR" => [], - "NSS" => [], - "Other Applications" => [], - "Penelope" => [], - "Release Engineering" => [], - "Rhino" => [], - "SeaMonkey" => [], - "Tamarin" => [], - "Tech Evangelism" => [], - "Testing" => [], - "Thunderbird" => [], - "Toolkit" => [], - "WebExtensions" => [], - }, - qr/^cf_due_date$/ => { - "bugzilla.mozilla.org" => [], - "Community Building" => [], - "Data & BI Services Team" => [], - "Data Compliance" => [], - "Developer Engagement" => [], - "Firefox" => ["Security: Review Requests"], - "Infrastructure & Operations" => [], - "Marketing" => [], - "mozilla.org" => ["Security Assurance: Review Request"], - "Mozilla Metrics" => [], - "Mozilla PR" => [], - "Mozilla Reps" => [], - }, - qr/^cf_locale$/ => { - "Mozilla Localizations" => ['Other'], - "www.mozilla.org" => [], - }, - qr/^cf_mozilla_project$/ => { - "Data & BI Services Team" => [], - }, - qr/^cf_machine_state$/ => { - "Release Engineering" => ["Buildduty"], - }, - qr/^cf_rank$/ => { - "Core" => [], - "Firefox for Android" => [], - "Firefox for iOS" => [], - "Firefox" => [], - "GeckoView" => [], - "Hello (Loop)" => [], - "Cloud Services" => [], - "Tech Evangelism" => [], - "Toolkit" => [], - }, - qr/^cf_has_regression_range$/ => { - "Core" => [], - "Firefox for Android" => [], - "Firefox for iOS" => [], - "Firefox" => [], - "GeckoView" => [], - "Toolkit" => [], - }, - qr/^cf_has_str$/ => { - "Core" => [], - "Firefox for Android" => [], - "Firefox for iOS" => [], - "Firefox" => [], - "GeckoView" => [], - "Toolkit" => [], - }, - qr/^cf_cab_review$/ => { - "Infrastructure & Operations Graveyard" => [], - "Infrastructure & Operations" => [], - "Data & BI Services Team" => [], - } +tie( + %$cf_visible_in_products, + "Tie::IxHash", + qr/^cf_colo_site$/ => { + "mozilla.org" => [ + "Server Operations", + "Server Operations: DCOps", + "Server Operations: Projects", + "Server Operations: RelEng", + "Server Operations: Security", + ], + "Infrastructure & Operations" => ["RelOps", "RelOps: Puppet", "DCOps",], + }, + qr/^cf_office$/ => {"mozilla.org" => ["Server Operations: Desktop Issues"],}, + qr/^cf_crash_signature$/ => { + "Add-on SDK" => [], + "addons.mozilla.org" => [], + "Android Background Services" => [], + "B2GDroid" => [], + "Calendar" => [], + "Composer" => [], + "Core" => [], + "DevTools" => [], + "Directory" => [], + "External Software Affecting Firefox" => [], + "Firefox" => [], + "Firefox for Android" => [], + "GeckoView" => [], + "JSS" => [], + "MailNews Core" => [], + "Mozilla Labs" => [], + "Mozilla Localizations" => [], + "mozilla.org" => [], + "Cloud Services" => [], + "NSPR" => [], + "NSS" => [], + "Other Applications" => [], + "Penelope" => [], + "Release Engineering" => [], + "Rhino" => [], + "SeaMonkey" => [], + "Tamarin" => [], + "Tech Evangelism" => [], + "Testing" => [], + "Thunderbird" => [], + "Toolkit" => [], + "WebExtensions" => [], + }, + qr/^cf_due_date$/ => { + "bugzilla.mozilla.org" => [], + "Community Building" => [], + "Data & BI Services Team" => [], + "Data Compliance" => [], + "Developer Engagement" => [], + "Firefox" => ["Security: Review Requests"], + "Infrastructure & Operations" => [], + "Marketing" => [], + "mozilla.org" => ["Security Assurance: Review Request"], + "Mozilla Metrics" => [], + "Mozilla PR" => [], + "Mozilla Reps" => [], + }, + qr/^cf_locale$/ => + {"Mozilla Localizations" => ['Other'], "www.mozilla.org" => [],}, + qr/^cf_mozilla_project$/ => {"Data & BI Services Team" => [],}, + qr/^cf_machine_state$/ => {"Release Engineering" => ["Buildduty"],}, + qr/^cf_rank$/ => { + "Core" => [], + "Firefox for Android" => [], + "Firefox for iOS" => [], + "Firefox" => [], + "GeckoView" => [], + "Hello (Loop)" => [], + "Cloud Services" => [], + "Tech Evangelism" => [], + "Toolkit" => [], + }, + qr/^cf_has_regression_range$/ => { + "Core" => [], + "Firefox for Android" => [], + "Firefox for iOS" => [], + "Firefox" => [], + "GeckoView" => [], + "Toolkit" => [], + }, + qr/^cf_has_str$/ => { + "Core" => [], + "Firefox for Android" => [], + "Firefox for iOS" => [], + "Firefox" => [], + "GeckoView" => [], + "Toolkit" => [], + }, + qr/^cf_cab_review$/ => { + "Infrastructure & Operations Graveyard" => [], + "Infrastructure & Operations" => [], + "Data & BI Services Team" => [], + } ); # Who to CC on particular bugmails when certain groups are added or removed. our %group_change_notification = ( - 'addons-security' => ['amo-editors@mozilla.org'], - 'b2g-core-security' => ['security@mozilla.org'], - 'bugzilla-security' => ['security@bugzilla.org'], - 'client-services-security' => ['amo-admins@mozilla.org', 'web-security@mozilla.org'], - 'cloud-services-security' => ['web-security@mozilla.org'], - 'core-security' => ['security@mozilla.org'], - 'crypto-core-security' => ['security@mozilla.org'], - 'dom-core-security' => ['security@mozilla.org'], - 'firefox-core-security' => ['security@mozilla.org'], - 'gfx-core-security' => ['security@mozilla.org'], - 'javascript-core-security' => ['security@mozilla.org'], - 'layout-core-security' => ['security@mozilla.org'], - 'mail-core-security' => ['security@mozilla.org'], - 'media-core-security' => ['security@mozilla.org'], - 'network-core-security' => ['security@mozilla.org'], - 'core-security-release' => ['security@mozilla.org'], - 'tamarin-security' => ['tamarinsecurity@adobe.com'], - 'toolkit-core-security' => ['security@mozilla.org'], - 'websites-security' => ['web-security@mozilla.org'], - 'webtools-security' => ['web-security@mozilla.org'], + 'addons-security' => ['amo-editors@mozilla.org'], + 'b2g-core-security' => ['security@mozilla.org'], + 'bugzilla-security' => ['security@bugzilla.org'], + 'client-services-security' => + ['amo-admins@mozilla.org', 'web-security@mozilla.org'], + 'cloud-services-security' => ['web-security@mozilla.org'], + 'core-security' => ['security@mozilla.org'], + 'crypto-core-security' => ['security@mozilla.org'], + 'dom-core-security' => ['security@mozilla.org'], + 'firefox-core-security' => ['security@mozilla.org'], + 'gfx-core-security' => ['security@mozilla.org'], + 'javascript-core-security' => ['security@mozilla.org'], + 'layout-core-security' => ['security@mozilla.org'], + 'mail-core-security' => ['security@mozilla.org'], + 'media-core-security' => ['security@mozilla.org'], + 'network-core-security' => ['security@mozilla.org'], + 'core-security-release' => ['security@mozilla.org'], + 'tamarin-security' => ['tamarinsecurity@adobe.com'], + 'toolkit-core-security' => ['security@mozilla.org'], + 'websites-security' => ['web-security@mozilla.org'], + 'webtools-security' => ['web-security@mozilla.org'], ); # Who can set custom flags (use full field names only, not regex's) -our $cf_setters = { - 'cf_colo_site' => [ 'infra', 'build' ], - 'cf_rank' => [ 'rank-setters' ], -}; +our $cf_setters + = {'cf_colo_site' => ['infra', 'build'], 'cf_rank' => ['rank-setters'],}; # Groups in which you can always file a bug, regardless of product or user. our @always_fileable_groups = qw( - addons-security - bugzilla-security - client-services-security - consulting - core-security - finance - infra - infrasec - l20n-security - marketing-private - mozilla-confidential - mozilla-employee-confidential - mozilla-foundation-confidential - mozilla-engagement - mozilla-messaging-confidential - partner-confidential - payments-confidential - tamarin-security - websites-security - webtools-security + addons-security + bugzilla-security + client-services-security + consulting + core-security + finance + infra + infrasec + l20n-security + marketing-private + mozilla-confidential + mozilla-employee-confidential + mozilla-foundation-confidential + mozilla-engagement + mozilla-messaging-confidential + partner-confidential + payments-confidential + tamarin-security + websites-security + webtools-security ); # Automatically CC users to bugs filed into configured groups and products our %group_auto_cc = ( - 'partner-confidential' => { - 'Marketing' => ['jbalaco@mozilla.com'], - '_default' => ['mbest@mozilla.com'], - }, + 'partner-confidential' => { + 'Marketing' => ['jbalaco@mozilla.com'], + '_default' => ['mbest@mozilla.com'], + }, ); # Force create-bug template by product # Users in 'include' group will be forced into using the form. our %create_bug_formats = ( - 'Data Compliance' => { - 'format' => 'data-compliance', - 'include' => 'everyone', - }, - 'developer.mozilla.org' => { - 'format' => 'mdn', - 'include' => 'everyone', - }, - 'Legal' => { - 'format' => 'legal', - 'include' => 'everyone', - }, - 'Recruiting' => { - 'format' => 'recruiting', - 'include' => 'everyone', - }, - 'Internet Public Policy' => { - 'format' => 'ipp', - 'include' => 'everyone', - }, + 'Data Compliance' => {'format' => 'data-compliance', 'include' => 'everyone',}, + 'developer.mozilla.org' => {'format' => 'mdn', 'include' => 'everyone',}, + 'Legal' => {'format' => 'legal', 'include' => 'everyone',}, + 'Recruiting' => {'format' => 'recruiting', 'include' => 'everyone',}, + 'Internet Public Policy' => {'format' => 'ipp', 'include' => 'everyone',}, ); # List of named queries which will be added to new users' footer our @default_named_queries = ( - { - name => 'Bugs Filed Today', - query => 'query_format=advanced&chfieldto=Now&chfield=[Bug creation]&chfieldfrom=-24h&order=bug_id', - }, + { + name => 'Bugs Filed Today', + query => + 'query_format=advanced&chfieldto=Now&chfield=[Bug creation]&chfieldfrom=-24h&order=bug_id', + }, ); 1; -- cgit v1.2.3-24-g4f1b