diff --git a/README.md b/README.md index 6b4bc0ff..64415d31 100644 --- a/README.md +++ b/README.md @@ -517,6 +517,8 @@ Options: # Pacticipant name [--display-name=DISPLAY_NAME] # Display name + [--main-branch=MAIN_BRANCH] + # The main development branch of the pacticipant repository [--repository-url=REPOSITORY_URL] # The repository URL of the pacticipant -o, [--output=OUTPUT] diff --git a/lib/pact_broker/client/cli/pacticipant_commands.rb b/lib/pact_broker/client/cli/pacticipant_commands.rb index 9d273087..5ea04360 100644 --- a/lib/pact_broker/client/cli/pacticipant_commands.rb +++ b/lib/pact_broker/client/cli/pacticipant_commands.rb @@ -2,13 +2,14 @@ module PactBroker module Client module CLI module PacticipantCommands - PACTICIPANT_PARAM_NAMES = [:name, :display_name, :repository_url] + PACTICIPANT_PARAM_NAMES = [:name, :display_name, :main_branch, :repository_url] def self.included(thor) thor.class_eval do desc 'create-or-update-pacticipant', 'Create or update pacticipant by name' method_option :name, type: :string, required: true, desc: "Pacticipant name" method_option :display_name, type: :string, desc: "Display name" + method_option :main_branch, type: :string, required: false, desc: "The main development branch of the pacticipant repository" method_option :repository_url, type: :string, required: false, desc: "The repository URL of the pacticipant" output_option_json_or_text shared_authentication_options diff --git a/lib/pact_broker/client/pacticipants/create.rb b/lib/pact_broker/client/pacticipants/create.rb index 7a771255..b7253a8b 100644 --- a/lib/pact_broker/client/pacticipants/create.rb +++ b/lib/pact_broker/client/pacticipants/create.rb @@ -38,7 +38,8 @@ def pacticipant_resource_params { name: params[:name], repositoryUrl: params[:repository_url], - displayName: params[:display_name] + displayName: params[:display_name], + mainBranch: params[:main_branch] }.compact end end