diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-12-16 20:17:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-16 20:17:05 +0100 |
commit | 334bead74bc9c5e819f14946726eaad40986d636 (patch) | |
tree | e7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /extensions/BMO | |
parent | 49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff) | |
download | bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz |
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'extensions/BMO')
-rw-r--r-- | extensions/BMO/Extension.pm | 13 | ||||
-rw-r--r-- | extensions/BMO/lib/Reports/ReleaseTracking.pm | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index db672f82a..e69d6f1e2 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -1532,8 +1532,8 @@ sub field_end_of_create { # Create an IT bug so Mozilla's DBAs so they can update the grants for metrics - if (Bugzilla->params->{'urlbase'} ne 'https://bugzilla.mozilla.org/' - && Bugzilla->params->{'urlbase'} ne 'https://bugzilla.allizom.org/') + if (Bugzilla->localconfig->{'urlbase'} ne 'https://bugzilla.mozilla.org/' + && Bugzilla->localconfig->{'urlbase'} ne 'https://bugzilla.allizom.org/') { return; } @@ -2544,11 +2544,6 @@ sub install_filesystem { my $contribute = eval { $json->decode(scalar read_file(bz_locations()->{cgi_path} . "/contribute.json")); }; - my $commit = $ENV{CIRCLE_SHA1}; - unless ($commit) { - $commit = `git rev-parse HEAD`; - chomp $commit; - } if (!$contribute) { die "Missing or invalid contribute.json file"; @@ -2557,8 +2552,8 @@ sub install_filesystem { my $version_obj = { source => $contribute->{repository}{url}, version => BUGZILLA_VERSION, - commit => $commit // "unknown", - build => $ENV{CIRCLE_BUILD_NUM} // "unknown", + commit => $ENV{CIRCLE_SHA1} // 'unknown', + build => $ENV{CIRCLE_BUILD_NUM} // 'unknown', }; $create_files->{'version.json'} = { diff --git a/extensions/BMO/lib/Reports/ReleaseTracking.pm b/extensions/BMO/lib/Reports/ReleaseTracking.pm index b6c7c4520..42ef24b47 100644 --- a/extensions/BMO/lib/Reports/ReleaseTracking.pm +++ b/extensions/BMO/lib/Reports/ReleaseTracking.pm @@ -16,7 +16,7 @@ use Bugzilla::Error; use Bugzilla::Extension::BMO::Util; use Bugzilla::Field; use Bugzilla::FlagType; -use Bugzilla::Util qw(correct_urlbase trick_taint validate_date); +use Bugzilla::Util qw(trick_taint validate_date); use JSON qw(-convert_blessed_universally); use List::MoreUtils qw(uniq); @@ -434,7 +434,7 @@ sub report { my $bugs = $dbh->selectcol_arrayref($query, undef, @params); push @$bugs, 0 unless @$bugs; - my $urlbase = correct_urlbase(); + my $urlbase = Bugzilla->localconfig->{urlbase}; my $cgi = Bugzilla->cgi; print $cgi->redirect( -url => "${urlbase}buglist.cgi?bug_id=" . join(',', @$bugs) |