Sha256: 1d365798308cbafeda6c69f091aa887125a05f79ff5f54386b4e7f417ff3b2aa
Contents?: true
Size: 866 Bytes
Versions: 10
Compression:
Stored size: 866 Bytes
Contents
# frozen_string_literal: true module Shipit module Webhooks module Handlers class Handler class << self attr_reader :param_parser def params(&block) @param_parser = ExplicitParameters::Parameters.define(&block) end end def self.call(params) new(params).process end attr_reader :params, :payload def initialize(payload) @payload = payload @params = self.class.param_parser.parse!(payload) end def process raise NotImplementedError end private def stacks @stacks ||= Repository.from_github_repo_name(repository_name)&.stacks || Stack.none end def repository_name payload.dig('repository', 'full_name') end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems