From f4f3505c4b160eafcab8a00ae252589910364ed5 Mon Sep 17 00:00:00 2001 From: Mark Côté Date: Fri, 4 Mar 2016 17:37:14 -0500 Subject: Bug 1253691 - In issue-api-key.pl, set the MozReview API key if the description is 'mozreview'. r=dylan --- scripts/issue-api-key.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/issue-api-key.pl b/scripts/issue-api-key.pl index c5bdd8ca4..35abb9200 100755 --- a/scripts/issue-api-key.pl +++ b/scripts/issue-api-key.pl @@ -26,8 +26,15 @@ my $login = shift my $description = shift; my $user = Bugzilla::User->check({ name => $login }); -my $api_key = Bugzilla::User::APIKey->create({ + +my $params = { user_id => $user->id, description => $description, -}); +}; + +if ($description && $description eq 'mozreview') { + $params->{app_id} = Bugzilla->params->{mozreview_app_id} // ''; +} + +my $api_key = Bugzilla::User::APIKey->create($params); say $api_key->api_key; -- cgit v1.2.3-24-g4f1b