summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMark Côté <mcote@alumni.uwaterloo.ca>2016-03-04 23:37:14 +0100
committerMark Côté <mcote@alumni.uwaterloo.ca>2016-03-07 20:18:35 +0100
commitf4f3505c4b160eafcab8a00ae252589910364ed5 (patch)
treeeebe2150f9ac4adf79c8903caf126c8a96c141c0 /scripts
parent1bb2d450243500cd237bd9d64df38df64df06dcd (diff)
downloadbugzilla-f4f3505c4b160eafcab8a00ae252589910364ed5.tar.gz
bugzilla-f4f3505c4b160eafcab8a00ae252589910364ed5.tar.xz
Bug 1253691 - In issue-api-key.pl, set the MozReview API key if the description is 'mozreview'. r=dylan
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/issue-api-key.pl11
1 files changed, 9 insertions, 2 deletions
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;