Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/review_apps/review-apps.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh
index 6ebb0f61a04..660257b042a 100755
--- a/scripts/review_apps/review-apps.sh
+++ b/scripts/review_apps/review-apps.sh
@@ -133,8 +133,8 @@ function disable_sign_ups() {
# We use this weird syntax because we need to pass a one-liner ruby command to a Kubernetes container via kubectl.
read -r -d '' multiline_ruby_code <<RUBY
user = User.find_by_username('root');
-puts 'Error: Could not find root user. Check that the database was properly seeded'; exit(1) unless user;
-token = user.personal_access_tokens.create(scopes: [:api], name: 'Token to disable sign-ups');
+(puts 'Error: Could not find root user. Check that the database was properly seeded'; exit(1)) unless user;
+token = user.personal_access_tokens.create(scopes: [:api], name: 'Token to disable sign-ups', expires_at: 30.days.from_now);
token.set_token('${REVIEW_APPS_ROOT_TOKEN}');
begin;
token.save!;