Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
convert labels to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Jun 7, 2011
1 parent a91626d commit bca1b57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/octokit/client/issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update_issue(repo, number, title, body, options={})
# @example List labels for pengwynn/octokit
# Octokit.labels("pengwynn/octokit")
def labels(repo, options={})
get("api/v2/json/issues/labels/#{Repository.new(repo)}", options)['labels']
get("repos/#{Repository.new(repo)}/labels", options,3)
end

# Add a label to a repository
Expand Down
8 changes: 4 additions & 4 deletions spec/octokit/client/issues_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
describe ".labels" do

it "should return labels" do
stub_get("issues/labels/sferik/rails_admin").
to_return(:body => fixture("v2/labels.json"))
labels = @client.labels("sferik/rails_admin")
labels.first.should == "bug"
stub_get("https://api.github.com/repos/pengwynn/octokit/labels").
to_return(:body => fixture("v3/labels.json"))
labels = @client.labels("pengwynn/octokit")
labels.first.name.should == "V3 Transition"
end

end
Expand Down

0 comments on commit bca1b57

Please sign in to comment.