Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Implement repo assignees #123

Merged
merged 2 commits into from

3 participants

@dlackty

As titled. (Ref: #118.)
Please help review and let me know if there is a problem. Thanks!

@travisbot

This pull request passes (merged 58b701e into cd7a39b).

@pengwynn pengwynn merged commit 097cfce into octokit:master

1 check passed

Details default The Travis build passed
@pengwynn
Owner

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2012
  1. @dlackty
  2. @dlackty

    Implement repo assignees.

    dlackty authored
This page is out of date. Refresh to see the latest.
View
4 lib/octokit/client/repositories.rb
@@ -181,6 +181,10 @@ def repository_issue_events(repo, options={})
end
alias :repo_issue_events :repository_issue_events
+ def repository_assignees(repo, options={})
+ get "repos/#{Repository.new repo}/assignees", options, 3
+ end
+ alias :repo_assignees :repository_assignees
end
end
end
View
30 spec/fixtures/v3/repo_assignees.json
@@ -0,0 +1,30 @@
+[
+ {
+ "gravatar_id": "6490beb544d67d937dfb99a6b3ed6e44",
+ "avatar_url": "https://secure.gravatar.com/avatar/6490beb544d67d937dfb99a6b3ed6e44?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "adamstac",
+ "url": "https://api.github.com/users/adamstac",
+ "id": 2933
+ },
+ {
+ "gravatar_id": "dfb3948650131e4f0385c3328187cfca",
+ "avatar_url": "https://secure.gravatar.com/avatar/dfb3948650131e4f0385c3328187cfca?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "ctshryock",
+ "url": "https://api.github.com/users/ctshryock",
+ "id": 61721
+ },
+ {
+ "gravatar_id": "7e19cd5486b5d6dc1ef90e671ba52ae0",
+ "avatar_url": "https://secure.gravatar.com/avatar/7e19cd5486b5d6dc1ef90e671ba52ae0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "pengwynn",
+ "url": "https://api.github.com/users/pengwynn",
+ "id": 865
+ },
+ {
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
+ "avatar_url": "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "sferik",
+ "url": "https://api.github.com/users/sferik",
+ "id": 10308
+ }
+]
View
11 spec/octokit/client/repositories_spec.rb
@@ -405,4 +405,15 @@
end
+ describe ".assignees" do
+
+ it "should list all the available assignees (owner + collaborators)" do
+ stub_get("/repos/pengwynn/octokit/assignees").
+ to_return(:body => fixture("v3/repo_assignees.json"))
+ assignees = @client.repo_assignees("pengwynn/octokit")
+ assignees.first.login.should == "adamstac"
+ end
+
+ end
+
end
Something went wrong with that request. Please try again.