Skip to content

Commit

Permalink
chore: copy back changes from pactflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 7, 2023
1 parent c216bec commit 89271f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/pact_broker/api/decorators/extended_pact_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
require "pact_broker/api/decorators/pact_decorator"

# Pactflow notes:
# This decorator was added for Pactflow, but we needed to change it so much that there
# is a separate class in pact_broker_fork/lib/pactflow/api/decorators/extended_pact_decorator.rb now
# and this one isn't used.

module PactBroker
module Api
module Decorators
Expand Down Expand Up @@ -47,4 +52,4 @@ def head_tags
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/pact_broker/api/pact_broker_urls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def webhooks_url base_url
"#{base_url}/webhooks"
end

def webhook_url uuid, base_url
def webhook_url uuid, base_url = ""
"#{base_url}/webhooks/#{uuid}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pact_broker/api/resources/base_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def invalid_json?
def find_pacticipant name, role
pacticipant_service.find_pacticipant_by_name(name).tap do | pacticipant |
if pacticipant.nil?
set_json_error_message("No #{role} with name '#{name}' found", title: "Not found", type: "not_found", status: 404)
set_json_error_message("No #{role} with name '#{name}' found", title: "Not found", type: "not-found", status: 404)
end
end
end
Expand Down

0 comments on commit 89271f1

Please sign in to comment.