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

check_gcp_project_billing_service.rb « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 854adf2177dccdc3e1fba55354f577573fdfe3dd (plain)
1
2
3
4
5
6
7
8
class CheckGcpProjectBillingService
  def execute(token)
    client = GoogleApi::CloudPlatform::Client.new(token, nil)
    client.projects_list.select do |project|
      client.projects_get_billing_info(project.name).billingEnabled
    end
  end
end