diff --git a/lib/pact_broker/contracts/contracts_to_publish.rb b/lib/pact_broker/contracts/contracts_to_publish.rb index 3440832f2..4746ed1e4 100644 --- a/lib/pact_broker/contracts/contracts_to_publish.rb +++ b/lib/pact_broker/contracts/contracts_to_publish.rb @@ -10,6 +10,14 @@ def self.from_hash(pacticipant_name: nil, pacticipant_version_number: nil, tags: def pacticipant_names contracts.flat_map(&:pacticipant_names).uniq end + + def provider_names + contracts.flat_map(&:provider_name).uniq + end + + def logging_info + to_h.slice(:pacticipant_name, :pacticipant_version_number, :tags, :branch, :build_url).merge(provider_names: provider_names) + end end end end diff --git a/lib/pact_broker/contracts/service.rb b/lib/pact_broker/contracts/service.rb index 461b6fd9d..e13bff71c 100644 --- a/lib/pact_broker/contracts/service.rb +++ b/lib/pact_broker/contracts/service.rb @@ -31,6 +31,7 @@ def triggered_webhooks_created_for_event(params) end def publish(parsed_contracts, base_url: ) + logger.info("Publishing contracts", parsed_contracts.logging_info) version, version_notices = create_version(parsed_contracts) tags = create_tags(parsed_contracts, version) pacts, pact_notices = create_pacts(parsed_contracts, base_url)