Sha256: 6bbaa6930eaef6ff790542c4574ec747c647e28d706c867d717fba36eb4c4ecd

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

class Gitcycle
  module Review

    def review(pass_fail, *issues)
      require_git && require_config

      if pass_fail == 'fail'
        label = 'Fail'
      else
        label = 'Pending QA'
      end

      if issues.empty?
        puts "\nLabeling issue as '#{label}'.\n".green
        get('label',
          'branch[name]' => branches(:current => true),
          'labels' => [ label ]
        )
      else
        puts "\nLabeling issues as '#{label}'.\n".green
        get('label',
          'issues' => issues,
          'labels' => [ label ],
          'scope' => 'repo'
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitcycle-0.3.5 lib/gitcycle/review.rb
gitcycle-0.3.4 lib/gitcycle/review.rb