lib/octokit/client/milestones.rb in octokit-1.8.0 vs lib/octokit/client/milestones.rb in octokit-1.8.1

- old
+ new

@@ -13,11 +13,11 @@ # @return [Array] A list of milestones for a repository. # @see http://developer.github.com/v3/issues/milestones/#List-Milestones-for-an-Issue # @example List milestones for a repository # Octokit.list_milestones("pengwynn/octokit") def list_milestones(repository, options={}) - get("/repos/#{Repository.new(repository)}/milestones", options, 3) + get("repos/#{Repository.new(repository)}/milestones", options, 3) end alias :milestones :list_milestones # Get a single milestone for a repository # @@ -30,11 +30,11 @@ # @return [Milestone] A single milestone from a repository. # @see http://developer.github.com/v3/issues/milestones/#get-a-single-milestone # @example Get a single milestone for a repository # Octokit.milestone("pengwynn/octokit", 1) def milestone(repository, number, options={}) - get("/repos/#{Repository.new(repository)}/milestones/#{number}", options, 3) + get("repos/#{Repository.new(repository)}/milestones/#{number}", options, 3) end # Create a milestone for a repository # # @param repository [String, Repository, Hash] A GitHub repository. @@ -46,11 +46,11 @@ # @return [Milestone] A single milestone object # @see http://developer.github.com/v3/issues/milestones/#create-a-milestone # @example Create a milestone for a repository # Octokit.create_milestone("pengwynn/octokit", "0.7.0", {:description => 'Add support for v3 of Github API'}) def create_milestone(repository, title, options={}) - post("/repos/#{Repository.new(repository)}/milestones", options.merge({:title => title}), 3) + post("repos/#{Repository.new(repository)}/milestones", options.merge({:title => title}), 3) end # Update a milestone for a repository # # @param repository [String, Repository, Hash] A GitHub repository. @@ -63,11 +63,11 @@ # @return [Milestone] A single milestone object # @see http://developer.github.com/v3/issues/milestones/#update-a-milestone # @example Update a milestone for a repository # Octokit.update_milestone("pengwynn/octokit", 1, {:description => 'Add support for v3 of Github API'}) def update_milestone(repository, number, options={}) - post("/repos/#{Repository.new(repository)}/milestones/#{number}", options, 3) + post("repos/#{Repository.new(repository)}/milestones/#{number}", options, 3) end alias :edit_milestone :update_milestone # Delete a single milestone for a repository # @@ -77,10 +77,10 @@ # @return [Response] Response with status 204, no content # @see http://developer.github.com/v3/issues/milestones/#delete-a-milestone # @example Delete a single milestone from a repository # Octokit.delete_milestone("pengwynn/octokit", 1) def delete_milestone(repository, number, options={}) - delete("/repos/#{Repository.new(repository)}/milestones/#{number}", options, 3, true, true) + delete("repos/#{Repository.new(repository)}/milestones/#{number}", options, 3, true, true) end end end end