From 6ece8e93f37e6a83ae97ca2c08339143aad8fd2e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 4 Mar 2022 14:38:31 +1100 Subject: [PATCH] feat: add relation for can-i-deploy branch to environment badge --- lib/pact_broker/api/decorators/pacticipant_decorator.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pact_broker/api/decorators/pacticipant_decorator.rb b/lib/pact_broker/api/decorators/pacticipant_decorator.rb index 5b24dba8f..546c5b10f 100644 --- a/lib/pact_broker/api/decorators/pacticipant_decorator.rb +++ b/lib/pact_broker/api/decorators/pacticipant_decorator.rb @@ -90,6 +90,14 @@ class PacticipantDecorator < BaseDecorator } end + link :'pb:can-i-deploy-branch-to-environment-badge' do | options | + { + title: "Can I Deploy #{represented.name} from branch to environment badge", + href: templated_can_i_deploy_branch_to_environment_badge_url(represented.name, options[:base_url]), + templated: true + } + end + curies do | options | [{ name: :pb,