Commit ada8e186 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make sure we skip nil environment

parent b60c3914
......@@ -62,7 +62,8 @@ class AutomatedCleanup
gitlab.deployments(project_path, per_page: DEPLOYMENTS_PER_PAGE).auto_paginate do |deployment|
environment = deployment.environment
next unless !environment.nil? && environment.name.start_with?('review/')
next unless environment
next unless environment.name.start_with?('review/')
next if checked_environments.include?(environment.slug)
last_deploy = deployment.created_at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment