Skip to content

Commit

Permalink
Return response resource for move_project_column instead of boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyw committed Nov 2, 2016
1 parent 8795fc9 commit 5df1c65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/octokit/client/projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ def delete_project_column(id, options = {})
# @param position [String] New position for the column. Can be one of
# <tt>first</tt>, <tt>last</tt>, or <tt>after:<column-id></tt>, where
# <tt><column-id></tt> is the id value of a column in the same project.
# @return [Boolean] Move result, true if successful
# @return [Sawyer::Resource] Result
# @see https://developer.github.com/v3/projects/columns/#move-a-project-column
# @example
# @client.move_project_column(3049, "last")
def move_project_column(id, position, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:position] = position
boolean_from_response :post, "projects/columns/#{id}/moves", opts
post "projects/columns/#{id}/moves", opts
end

# List columns cards
Expand Down
1 change: 1 addition & 0 deletions spec/octokit/client/projects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
describe ".move_project_column", :vcr do
it "moves the project column" do
result = oauth_client.move_project_column(@column.id, "last")
expect(result).not_to be_nil
assert_requested :post, github_url("/projects/columns/#{@column.id}/moves")
end
end # .move_project_column
Expand Down

0 comments on commit 5df1c65

Please sign in to comment.