Sha256: 1018c5e5bc6eb3f880bb2a51c0c04048206dace8be2b6c019c30e3d7e1391c0a

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

require 'concourse-fuselage'
require 'contracts'
require_relative 'core'
require_relative 'support/git'
require_relative 'support/github'
require_relative 'support/params'

module GitHubStatus
  class In < Fuselage::In
    include Core
    include Support::Params
    include Support::Git
    include Support::GitHub

    def state
      github
        .statuses(repo, sha)
        .select { |status| status.context == context }
        .map(&:state)
        .first
    end

    def fetch!
      File.write "#{workdir}/#{context}.state", state
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
concourse-github-status-0.4.1 lib/github-status/in.rb