Sha256: ec3410eab25a71e251bd7f05d572e4b344076ca1af95b0fbdaba3fe345bb46c5

Contents?: true

Size: 638 Bytes

Versions: 10

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true
module Shipit
  module Webhooks
    module Handlers
      class StatusHandler < Handler
        params do
          requires :sha, String
          requires :state, String
          accepts :description, String
          accepts :target_url, String
          accepts :context, String
          accepts :created_at, String

          accepts :branches, Array do
            requires :name, String
          end
        end

        def process
          Commit.where(sha: params.sha).each do |commit|
            commit.create_status_from_github!(params)
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.38.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.37.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.36.1 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.36.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.35.1 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.35.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.34.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.33.0 app/models/shipit/webhooks/handlers/status_handler.rb
shipit-engine-0.32.0 app/models/shipit/webhooks/handlers/status_handler.rb