Sha256: 3a6f029b6c1f6bb47c81e8c1ad5beac03895ff79995095fc30feee2bd3da2c10

Contents?: true

Size: 424 Bytes

Versions: 9

Compression:

Stored size: 424 Bytes

Contents

class Cody::CLI
  class Badge < Base
    def run
      resp = codebuild.batch_get_projects(names: [@full_project_name])
      project = resp.projects.first
      unless project
        puts "Project not found: #{@full_project_name}"
        return
      end

      url = project.badge.badge_request_url
      if @options[:markdown]
        puts "![CodeBuild](#{url})"
      else
        puts url
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cody-1.2.1 lib/cody/cli/badge.rb
cody-1.1.0 lib/cody/cli/badge.rb
cody-1.0.6 lib/cody/cli/badge.rb
cody-1.0.5 lib/cody/cli/badge.rb
cody-1.0.4 lib/cody/cli/badge.rb
cody-1.0.3 lib/cody/cli/badge.rb
cody-1.0.2 lib/cody/cli/badge.rb
cody-1.0.1 lib/cody/cli/badge.rb
cody-1.0.0 lib/cody/cli/badge.rb