Skip to content

Commit

Permalink
Fix build parameters POST body
Browse files Browse the repository at this point in the history
- Restore build_parameters key in build_branch POST body
  • Loading branch information
mtchavez committed May 11, 2017
1 parent 0773d2b commit c7cab4d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/circleci/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,13 @@ def build
#
# Build the latest push for this branch of a specific project
#
# @param branch [String] - Name of branch
# @param params [Hash] - Optional params to send for building
# @param body [Hash] - Optional post body with build parameters
# @return [CircleCi::Response] - Response object
def build_branch(branch, params = {}, body = {})
# @param branch [String] - Name of branch
# @param params [Hash] - Optional params to send for building
# @param build_parameters [Hash] - Optional post body with build parameters
# @return [CircleCi::Response] - Response object
def build_branch(branch, params = {}, build_parameters = {})
body = {}
body['build_parameters'] = build_parameters unless build_parameters.empty?
CircleCi.request(@conf, "/project/#{username}/#{project}/tree/#{branch}", params).post(body)
end

Expand Down

0 comments on commit c7cab4d

Please sign in to comment.