Sha256: edf636b6df26c347796cffde00841702282ab369365d26ae2617f5f1c06cd8d7

Contents?: true

Size: 440 Bytes

Versions: 8

Compression:

Stored size: 440 Bytes

Contents

# frozen_string_literal: true
module Shipit
  module Webhooks
    module Handlers
      class PushHandler < Handler
        params do
          requires :ref
        end
        def process
          stacks
            .not_archived
            .where(branch: branch)
            .find_each(&:sync_github)
        end

        private

        def branch
          params.ref.gsub('refs/heads/', '')
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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